> From: owner-openssl-us...@openssl.org On Behalf Of marek.marc...@malkom.pl
> Sent: Monday, 22 April, 2013 12:43
(reordered and requoted for clarity)

> owner-openssl-us...@openssl.org wrote on 04/22/2013 06:00:37 PM:
> 
> > Venkataragavan Vijayakumar <venkataragava...@gmail.com> 
> > Sent by: owner-openssl-us...@openssl.org

> > I am using openssl for the HTTPS connection asyncronously.  
> > whenever i need to send a 
> > HTTPS request , i will create a new SSL connection with the 
> > server, i never use the same
> > connection, since the server is not supporting it.
> > 
I assume you mean the server does not handle multiple HTTP requests 
on one transport (SSL) connection, aka pipelining.

What is your asyncronous? One nonblocking connection at a time 
but overlapped or interleaved with other processing (maybe
generating the requests and processing replies)? Multiple 
threads each with one connection at a time -- blocking or non?
One thread (or nonthreaded) with multiple nonblocking connections 
interleaved using select() or moral equivalent?

Aside: the standard spelling has an h: synchronous, asynchronous.
But it is commonly abbreviated without: sync, async, syncing, 
synced. (One joker I worked with in the past used "sunk".)

> > so for every request the SSL_CTX_new() will be called, in 

That's no reason to create new contexts. The main reason 
for having SSL_CTX and SSL objects seperate is so that you 
can create multiple connections, each one SSL object, from 
(and under) the same SSL_CTX. Although if for whatever reason 
you do *want* multiple contexts, that should work also.
(Unless you run out of resources like memory, and that 
won't happen on the 3rd time. On a system that can run 
openssl + apps, it might happen on the 10,000th time.)

> > the third time , i am getting 
> > the error: 
> > 
> > error:140A90F1:lib(20):func(169):reason(241) 
> > 
> # openssl errstr 140A90F1
> error:140A90F1:SSL routines:SSL_CTX_new:unable to load ssl2 
> md5 routines
> 
That sounds like memory getting clobbered.
Check your code for valid pointer uses, 
or try a memory checker like valgrind.
If multi-threaded or state-driven for "async", 
check especially for using pointers to things that 
have been freed, especially in exception cases 
like a timeout triggering a stale handler.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to