hi,

i have a multithreaded server that manage TLS connections to the
clients.

to enable TLS on an unencrypted tcp stream i use:

SSL_load_error_strings();
SSL_library_init();
ctx = SSL_CTX_new(SSLv23_server_method());
...

ssl = SSL_new(ctx);
...

to shutdown and cleanup a connection a use:

int rval = SSL_shutdown(sslServer);
if (rval == 0) {
  SSL_shutdown(sslServer);
}
SSL_free(ssl);
SSL_CTX_free(ctx);


is that right or is there a smaller solution?
is it necessary to init the library every for every connection
or is there a possibility to init the library only once (when starting
server application)?


greetings, Alex

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to