> From: [email protected] On Behalf Of ikuzar
> Sent: Monday, 07 March, 2011 10:00
> I have a function my_initialize( ) which initialize a lot
> of thing before doing my_connect( ), my_accept( ), etc.
> In my_initialize( ), I call :
> - SSL_library_init();
> - SSL_load_error_strings();
> In my_connect( ), I set handshake:
> - meth = TLSv1_method( );
> - ctx = SSL_CTX_new(meth);
> - SSL_CTX_set_cipher_list( )
> - SSL_CTX_use_certificate_file( )
> - ...
Presumably also (at least) use_PrivateKey (matching the cert)
and ending with ssl = SSL_new (ctx).
> - SSL_connect( )
> now, I have to load certificate in my_initialize( )
> and not in my_connect( ). How must I tell SSL_connect ( )
> that the certificate is already loaded in my_initialize( )
> and it must use this certificate to process handshake ?
Create and set-up ctx (SSL_CTX object) in initialize, and
later use ctx to create an SSL object for the/each connection.
This is exactly why SSL_CTX exists: to store, once and possibly
in advance, the parameters for possibly multiple connections.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]