You may use an SSL_CTX object to create multiple sessions under multiple
threads.  Each session must have all of its I/O done in one thread (due to
some rather nasty locking issues), but the SSL_CTX, once created and
populated, is generally not updated -- which means that it's safe to perform
read-only access to it, *iff* you aren't modifying it in another thread.  If
you do, you have to lock it, same as every other race condition.

SSL_connect() does not corrupt memory contents.  If it works, it simply has
a file descriptor in the SSL structure, and possibly (if it connected and
negotiated SSL/TLS) keying information in the same structure.  Same with
SSL_set_fd(), except that it associates an open file descriptor with the SSL
session.

SSL_library_init() is literally the same thing as
OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms().  So, you're
just going through the process of reregistering everything, but you
shouldn't run into any major issues.  (Note I haven't looked at the code at
this point to verify.)

-Kyle H

On Mon, Sep 14, 2009 at 3:42 AM, svijay <svi...@eiqnetworks.com> wrote:

>  Hello,
>
>
>
> -- Can we use single SSL_CTX object for multiple sessions at a time under
> multiple threads?
>
> -- Does SSL_connect() or SSL_set_fd() corrupts memory contents in any
> case?
>
> -- Can we call SSL_library_init() many times in a exe till it gets exited?
> Does it impact anything?
>
> I am using TLSv1.
>
>
>
> Thanks in advance.
>
>
>
> Thanks & Regards,
>
> VijayKumar.S | Software Engineer
> *eIQnetworks®, Inc. | *www.eiqnetworks.com
>
> e. svi...@eiqnetworks.com <rsvi...@eiqnetworks.com> | b.
> http://blog.eiqnetworks.com/<https://mail.eiqnetworks.com/exchweb/bin/redir.asp?URL=http://blog.eiqnetworks.com/>
>
> **
>
> *"We can honestly say that eIQnetworks has the broadest range of
> capabilities we’ve seen in one integrated product."  - Technology Executive
> Alert By Linda Musthaler, Network World*
>
>
>

<<image001.jpg>>

  • SSL_CTX svijay
    • Re: SSL_CTX Kyle Hamilton

Reply via email to