I'm trying to figure out what iOS' policy is when verifying certificates using Security.Framework regarding revocation of certificates. I cannot find information about this in the docs for iOS. In the context of an iPad project I'm working on at the moment, there is reason to demand checking revocation status for some certs. Anyone ideas on how to force CRL / OCSP checking during cert verification using Security.Framework? Or do I need to "fall back" to OpenSSL to accomplish this?
It seems that also on Mac OS X 10.6 CRL / OCSP checks are done optionally and have to be turned on manually through Keychain Access.
Martijn
I just did this on iOS in GCDAsyncSocket.
For a given SecTrustRef trust; do this
//edit to check the trustResultType
I have an answer to this question by Apple guys, I posted the full answer here:
Details on SSL/TLS certificate revocation mechanisms on iOS
To sum it up, there are several things to keep in mind for OCSP implementation on iOS:
I was able to enable CRL checking for a
SecTrustRef
object on iOS 10:Calling
SecTrustSetNetworkFetchAllowed
was key. Without that call,SecTrustEvaluate
returnedkSecTrustResultUnspecified
instead.