Questions tagged «certificate-revocation»

1
如何使CRL和OSCP检查在iOS上运行?
我无法在iOS上使用CRL。我创建了两个测试用例。我有由CA颁发的有效证书。我有由CA颁发的另一个有效证书,但是CA已将该证书添加到其CRL中。 然后,我设置了一个启用CRL检查并要求成功的吊销策略。 func crlValidationTest(trustedCert: SecCertificate, certToVerify: SecCertificate) -> Bool { let basicPolicy = SecPolicyCreateBasicX509() let crlPolicy = SecPolicyCreateRevocation(kSecRevocationOCSPMethod | kSecRevocationCRLMethod | kSecRevocationRequirePositiveResponse)! var trust: SecTrust? SecTrustCreateWithCertificates(NSArray(object: certToVerify), NSArray(objects: basicPolicy, crlPolicy), &trust) SecTrustSetAnchorCertificates(trust!, NSArray(object: trustedCert)) SecTrustSetNetworkFetchAllowed(trust!, true) var trustResult = SecTrustResultType.invalid guard SecTrustEvaluate(trust!, &trustResult) == errSecSuccess else { return false } …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.