cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ssl problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 May 2003 23:20:13 +0200 (CEST)

On Thu, 22 May 2003, [iso-8859-15] Andrés García wrote:

> I have found a strange problem with ssl that only happens in some special
> circumstances.
>
> The problem is that when I try to do perform a ssl transfer it always fails
> the first time with error:
>
> SSL: error:00000000:lib(0):func(0):reason(0)
>
> which means no error, right?

Well, it means that libcurl somehow decided that SSL failed and then when it
tries to dig out the reason, it gets a "no reason at all" response.

> But if I try to perform the transfer a second time it works perfectly, no
> need to reconfigure it at all.

Odd.

> Tracking the bug I think it is in the seeding process, when
> 'RAND_file_name' is invoked it returns a file called 'c:\/.rnd', since that
> looked weird for a file name I hardcoded it to be 'c:/.rnd', which seems to
> have taken care of the error.

So do you actually have such a file, or why was this a problem? Anyhow, I
don't understand how this can make you succeed the second time you run it...

> So, does that make sense?, and if it does, is it a libcurl or an openssl
> problem?

libcurl doesn't set any file names like that. RAND_file_name() is documented
to generate "a default path for the random seed file". So if that name is
bad, then I guess OpenSSL is to blame.

Further reading on the man page also explains:

       The seed file is $RANDFILE if that
       environment variable is set, $HOME/.rnd otherwise. If
       $HOME is not set either, or num is too small for the path
       name, an error occurs.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-22