mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-12-22 04:07:09 +00:00
Fix dumb mistake.
This commit is contained in:
parent
32f0ed88f4
commit
5a2d3ecc2e
@ -16,6 +16,10 @@ extension SigningRequestProvenance {
|
||||
chain.last!
|
||||
}
|
||||
|
||||
public var intact: Bool {
|
||||
return chain.reduce(true) { $0 && $1.validSignature }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension SigningRequestProvenance {
|
||||
@ -32,7 +36,7 @@ extension SigningRequestProvenance {
|
||||
self.pid = pid
|
||||
self.name = name
|
||||
self.path = path
|
||||
self.validSignature = true
|
||||
self.validSignature = validSignature
|
||||
self.parentPID = parentPID
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,9 @@ struct SigningRequestTracer {
|
||||
_ = proc_pidpath(pid, pathPointer, UInt32(MAXPATHLEN))
|
||||
let path = String(cString: pathPointer)
|
||||
var secCode: Unmanaged<SecCode>!
|
||||
let flags: SecCSFlags = [SecCSFlags.considerExpiration, SecCSFlags.enforceRevocationChecks]
|
||||
let flags: SecCSFlags = [.considerExpiration, .enforceRevocationChecks]
|
||||
SecCodeCreateWithPID(pid, SecCSFlags(), &secCode)
|
||||
let valid = SecCodeCheckValidity(secCode.takeRetainedValue(), flags, nil) == ERR_SUCCESS
|
||||
let valid = SecCodeCheckValidity(secCode.takeRetainedValue(), flags, nil) == errSecSuccess
|
||||
return SigningRequestProvenance.Process(pid: pid, name: procName, path: path, validSignature: valid, parentPID: ppid)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user