Closed hdoria closed 7 years ago
If the key is in OpenSSL compatible PKEY format (which I guess is the case in most scenarios), yes it is, but you need to download the key yourself. There are unlimited ways of how and where to download keys and because of that it belongs to your application to implement it.
A good library to download HTTP files is https://github.com/AFNetworking/AFNetworking
If it is just about extracting public key from a certificate, you can do that easily by using method X509_get_pubkey
which is defined in openssl/x509.h
. MIHCrypto currently doesn't implement a wrapper for OpenSSL's X509 structure, may be we should implement it. :)
X509 is a very important part of OpenSSL and I should add it to my ToDo list.
Will be happy to help you implement it. Can you add TODO.md or update README to include the todo.
I prefer to use to GitHub issues as ToDo list. At the moment the only task on my ToDo list is to add elliptic curve cryptography support.
I can't add the certificate in my application bundle. I need to download the SSL certificate and extract the public key in real time. Is there a way to do this?