Philip, Similar q came up in (http://www.mail-archive.com/openssl-users@openssl.org/msg15260.html). Your way seems as good or better than any other I've seen. When you say you are "creating the X509 cert yourself", I assume you are using something like PEM_read_X509(). _____________________________________ Greg Stark Ethentica, Inc. [EMAIL PROTECTED] _____________________________________ ----- Original Message ----- From: "Philip J Grabner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 24, 2001 5:39 PM Subject: QUESTION: how to retrieve the cert from an SSL_CTX > > hi all, > > when using the call SSL_CTX_use_certificate_file(), i can't seem to figure > out how to get the certificate that was loaded... as a "work around", i am > currently creating the X509 cert myself, and then calling > SSL_CTX_use_certificate() instead. is there a call to get the certificate > from the SSL_CTX structure? i tried bypassing the API using: > > /* declared earlier: SSL_CTX * ctx; */ > X509 * sx = ctx->cert->key->x509; > > but unfortunately ctx->cert (of type cert_st) is not a public structure, > so i get compile time problems. > > any ideas? > > TIA, > phil. > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]