Well, yesterday I finally downloaded the latest OpenSSL (0.9.5a) and read the docs and
compiled it on NT....the docs need a lot of work, and it didn't
compile all the way, but it compiled enough. openssl.exe (s_client) worked, but I
couldn't figure it out enough to use those API functions. In stead, I used
/demos/ssl/cli.cpp and the gadget sample on Darkspell, but alas, I could never get
them to work. I made the modifications needed for them to run on
Windows, but it always failed during SSL_connect(). I speant several hours (too long
probably) trying to get the API in s_client to work and trying to figure
out what I was doing wrong. I knew where it was failing, but it didn't make sense.
Eventually I decided that it had to be a bug in OpenSSL, and I looked up
on the archives/deja to see if ppl agreed, and they did...kinda. They said there was
a bug in some situations, and I presumed it meant mine. I tried to
download the latest snapshop, but it wouldn't compile for me, so I manually changed
0.9.5a, and now it works perfectly. I bet that this problem has already
been fixed, and I dunno if what I did is the best way to do it, but it works for me.
Here is an explaination of what I did in case any one wants to know:
In crypto/rand/md_rand.c, I modified the function ssleay_rand_bytes() in the following
ways:
In the declarations section, I added the following line:
unsigned char *OrgBuf;
Some where else toward the beginning, I added this:
OrgBuf = Buf;
Towards the end of the function, I replaced this:
if (ok)
return(1);
else
{
RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED);
return(0);
}
with this:
if (strlen(OrgBuf))
return(1);
else
{
RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED);
return(0);
}
That's it. Hope this helps some one and isn't just a waste of bandwidth.
Daniel M. Pomerantz
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]