How to convert encoded DER certitificate to NSString format?

234 views Asked by At

I’m working on certificate based authentication for my application. I can able to get the certificate from keychain, it’s in DER format with CFData type. I need to send the certificate CFData to server for authentication, is it possible to convert the certificate data into NSString format?

Thank you

1

There are 1 answers

0
rmaddy On

Cast the CFData reference to NSData and then use base64EncodedStringWithOptions: to encode the data into a string.