On Wed, 27 May 1998, David Deza wrote:
> I'm  making an communication application and I must cope with internet
> certificates. I'm really stuck when it comes to displaying the certificate
> data, specially keys lengths... Would somebody please tell me how to get the
> certificate secret and public keys lengths from a certificate ??

Given a certificate, called cert

        bits=EVP_PKEY_bits(X509_get_pubkey(cert));

should give you what you want.  It works for RSA and DSA certs.

eric

+-------------------------------------------------------------------------+
| Administrative requests should be sent to [EMAIL PROTECTED] |
| List service provided by Open Software Associates, http://www.osa.com/  |
+-------------------------------------------------------------------------+

Reply via email to