Skip to content

Commit

Permalink
code directory
Browse files Browse the repository at this point in the history
  • Loading branch information
p-x9 committed Mar 12, 2024
1 parent 6b642ca commit ae4382c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/MachOKit/Protocol/CodeSignProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import Foundation

public protocol CodeSignProtocol {
var superBlob: CodeSignSuperBlob? { get }
/// Sequence of code directories
var codeDirectories: [CodeSignCodeDirectory] { get }
/// Best hash type code directory
var codeDirectory: CodeSignCodeDirectory? { get }
/// Entitlements embedded in the MachO binary
var embeddedEntitlements: [String: Any]? { get }
/// DER-encoded entitlements data embedded in MachO binary
Expand Down Expand Up @@ -40,6 +43,10 @@ public protocol CodeSignProtocol {
}

extension CodeSignProtocol {
public var codeDirectory: CodeSignCodeDirectory? {
codeDirectories.bestHashTyped
}

/// Entitlements data embedded in the MachO binary
public var embeddedEntitlementsData: Data? {
guard let superBlob else {
Expand Down

0 comments on commit ae4382c

Please sign in to comment.