hi
> Hmm. When you perform SSL_new(), you should see (openssl/ssl/ssl_lib.c:232):
> s->options=ctx->options;
>
> I don't really see what should go wrong at this point.
> Lutz
Yes you are right (i forgott the check the return value of SSL_connect()
and so SSL_get_version returned with a wrong/old value).
The second connect fails:
ctx = SSL_CTX_new(SSLv23_client_method());
ssl = SSL_new(ctx);
SSL_set_fd(ssl, sox);
printf("FIRST ssl_connect: %d\n", SSL_connect(ssl));
printf("ssl version: %s\n", SSL_get_version(ssl));
SSL_clear(ssl);
SSL_free(ssl);
/* tcp connection is still established...good */
/* we do not free ctx here..this is not the problem */
ctx2 = SSL_CTX_new(SSLv23_client_method());
ssl2 = SSL_new(ctx2);
SSL_set_fd(ssl2, sox);
printf("SECOND SSL_connect() %d\n", SSL_connect(ssl2));
Why ? The tcp connection is still established and the first
ssl-connection was (ssl-)closed perfectly.
skyper
--
PGP: dig @segfault.net skyper axfr|grep TX|cut -f2 -d\"|sort|cut -f2 -d\;
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]