Bodo Moeller wrote:
>
> Richard Levitte - VMS Whacker <[EMAIL PROTECTED]>:
>
> >> SSLeay_add_ssl_algorithms (); <---*****(1)
>
> >> SSL_load_error_strings (); <---*****(1)
>
> > (1) These are really only mean to be used ONCE for the whole
> > application. The ssl algorithm table and the error message table
> > is global. [...]
>
> Yup.
>
> >> // Cleanup and exit.
> >> if (pSsl) SSL_shutdown (pSsl);
> >>
> >> iRetCode = shutdown (sSocket, SD_BOTH);
> >> closesocket (sSocket);
> >> if (pSsl) SSL_free (pSsl);
>
> > THAT sequence gives me the creaps (sp?). You see, the fd's you
> > declared earlier with SSL_set_fd() got "registered" in the SSL
> > structure through a couple of BIOs. SSL_free() will fo a
> > BIO_free_all() on those, and BIO_free_all() will most definitely try
> > to close the socket...
>
> Actually not, because SSL_set_fd uses BIO_set_fd(bio,fd,BIO_NOCLOSE).
> You have to close the sockets yourself when using SSL_set_fd.
Yes you're right. Ignore my comments about this. I'm paranoid as far as
that race condition is concerned on the grounds I spent several days
tracking down a similar problem to that cause :-(
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]