On Tue, Dec 11, 2001 at 10:47:40AM +0100, Douglas Wikström wrote: > Hello! > > I use this when initializing. > > SSL_CTX_use_PrivateKey_file(ssl_ctx, keyfile, SSL_FILETYPE_PEM) > > what is the correct way of accessing this keyfile later. I.e. I would > like to say: > > skey = ssl_ctx->private_key;
There is no "offical" way in the API to access the private key later. This is partly true, as you can at least have two private keys (one for RSA and one for DSA authentication) at the same time. Solution: Use PEM_read_PrivateKey() to read the key from the file (and thus are able to access it "as is") and then use SSL_CTX_use_PrivateKey() to set it. Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/ Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129 Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153 ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]