On 1 Nov 2010, at 12:05 PM, Eichenberger, John wrote: > I am planning on adding code to call SSL_CTX_use_PrivateKey. I do not > have a key file to supply, so I cannot use SSL_CTX_use_PrivateKey_file. > > However, I thought I would ask about this because I've reviewed the code > for both of those procedures and still see no place where the privatekey > member variable would be defined. So it seems like a useless endeavor.
It looks like: SSL_CTX_use_PrivateKey_file() calls SSL_CTX_use_PrivateKey() SSL_CTX_use_PrivateKey() calls the internal function ssl_set_pkey() ssl_set_pkey() assigns to the 'privatekey' member of the CERT structure. ssl_set_pkey() actually assigns to cert->pkeys[...].privatekey, and then points cert->key to the specific pkeys[] entry. The comment on the declaration for cert->key says: /* ALWAYS points to an element of the pkeys array * Probably it would make more sense to store * an index, not a pointer. */ ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org