Hi Matt,
I took the certificate in the source I posted and put it in a file in /tmp/test.pem and ran openssl x509 -in ./test.pem -out test.der -outform DER to convert it to a DER formatted file (which im 99% sure is what my original code produced (pem comment header and footer lines removed and newlines removed and base64 decoded). Loading DER format directly from a file like so:
let CertDER = try Data(contentsOf: URL(fileURLWithPath: "/tmp/test.der"))
didn't make a difference. It still saved to the keychain fine and was retrievable using the kSecMatchSubjectContains attribute but not the kSecAttrLabel attribute .
Topic:
App & System Services
SubTopic:
General
Tags: