Get private SecKeyRef from DER file?

Posted by Alexander Parfyanovich on Stack Overflow See other posts from Stack Overflow or by Alexander Parfyanovich
Published on 2011-11-14T11:45:23Z Indexed on 2011/11/17 9:51 UTC
Read the original article Hit count: 375

In my iPhone project I have used this solution to encrypt data with DER encoded certificate, which was generated by openssl commands like this:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.pem -out cert.pem
openssl x509 -outform der -in cert.pem -out cert.der
openssl rsa -in privateKey.pem -outform DER -out privateKey.der

And now I want to decrypt data using private key file. How can I get the private SecKeyRef instance from DER encoded private key file?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c