I am trying to check a certificate whether it is revoked or not with CRL. I downloaded CRL file from the host but I can't find any examples how I can create a trust object or check the certificate. I can validate my certificate with OCSP method but i am stuck in CRL. Appreciate any help 🙂.
You should be able to do this by:
Creating a policy object that does whatever standard checking you want; if you don’t need anything special, use
SecPolicyCreateBasicX509Calling
to create a second policy to check revocation withSecPolicyCreateRevocation
andkSecRevocationRequirePositiveResponsekSecRevocationCRLMethodPassing both of those, along with the certificate in question and any intermediate certificates, to
SecTrustCreateWithCertificatesDoing any extra configuration of the trust object; for example, if certificate was issued by a custom CA, call
to trust that CA’s root certificateSecTrustSetAnchorCertificatesEvaluating trust on the trust object
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"