我想在运行时将OSX/iOS证书导入到OpenSSL上下文中。为此,我使用带有以下代码的SecItemCopyMatching从OS密钥链中检索证书:
CFMutableDictionaryRef attrDict = CFDictionaryCreateMutable(NULL, 4, NULL, NULL);
CFDictionaryAddValue(attrDict, kSecClass, kSecClassCertificate);
CFDictionaryAddValue(attrDict, kSecReturnRef, kCFBooleanTrue);
CFDictionaryAddValue(attrDict, kSecMatchLimit, kSecMatchLimitAll);
CFDictionaryAddValue(attrDict, kSecMatchTrustedOnly, kCFBooleanTrue );
res = SecItemCopyMatching(attrDict, (CFTypeRef*)&certlist);
这似乎会返回用户和系统证书,但它不会返回密钥链中“系统根”的内容。我怎样才能找回这些井?
https://stackoverflow.com/questions/33947623
复制相似问题