Verdon Walker wrote: > > > I am getting a client certificate using SSL_get_peer_certificate() and > I need to know the size of the certificate in bytes. Is there a call I > can make to find out the size of the X509 object? I know it is encoded > and the size is part of the encoding so it should be a simple query to > get it, but I've looked and can't find the function to call. Help. >
If by the "size of the certificate" you mean the size of its DER encoding then i2d_X509() will do the job. See the FAQ for info on how to use the i2d_XXX functions. Steve. -- Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/ Personal Email: [EMAIL PROTECTED] Senior crypto engineer, Gemplus: http://www.gemplus.com/ Core developer of the OpenSSL project: http://www.openssl.org/ Business Email: [EMAIL PROTECTED] PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]