SSL_CTX_new() failing when i try to do connect the server third time.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SSL_CTX_new() failing when i try to do connect the server third time.

venkataragavan vijayakumar
Hi All,

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.

so for every request the SSL_CTX_new() will be called, in the third time , i am getting the error: 

error:140A90F1:lib(20):func(169):reason(241) 

Please help me to solve this issue.

Thanks,
Venkat.
Reply | Threaded
Open this post in threaded view
|

Re: SSL_CTX_new() failing when i try to do connect the server third time.

Marek.Marcola
Hello,

# openssl errstr 140A90F1
error:140A90F1:SSL routines:SSL_CTX_new:unable to load ssl2 md5 routines

Best regards,
--
Marek Marcola <[hidden email]>

[hidden email] wrote on 04/22/2013 06:00:37 PM:

> Venkataragavan Vijayakumar <[hidden email]>
> Sent by: [hidden email]
>
> 04/22/2013 06:31 PM
>
> Please respond to
> [hidden email]
>
> To
>
> [hidden email],
>
> cc
>
> Subject
>
> SSL_CTX_new() failing when i try to do connect the server third time.
>
> Hi All,
>
> 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.
>
> so for every request the SSL_CTX_new() will be called, in the third time
, i am getting
> the error:
>
> error:140A90F1:lib(20):func(169):reason(241)
>
> Please help me to solve this issue.
>
> Thanks,
> Venkat.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: SSL_CTX_new() failing when i try to do connect the server third time.

Dave Thompson-5
> From: [hidden email] On Behalf Of [hidden email]
> Sent: Monday, 22 April, 2013 12:43
(reordered and requoted for clarity)

> [hidden email] wrote on 04/22/2013 06:00:37 PM:
>
> > Venkataragavan Vijayakumar <[hidden email]>
> > Sent by: [hidden email]

> > 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                    [hidden email]
Automated List Manager                           [hidden email]