From: Dr. Stephen Henson Date: Wed, 25 May 2011 15:15:52 +0000 (+0000) Subject: PR: 2529 X-Git-Tag: OpenSSL_1_0_0e~35 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db886c2a2b4c9beb452062b668b95da53f2655fd;p=oweals%2Fopenssl.git PR: 2529 Submitted by: Marcus Meissner Reviewed by: steve Call ssl_new() to reallocate SSL BIO internals if we want to replace the existing internal SSL structure. --- diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index af319af302..eedac8a3fc 100644 --- a/ssl/bio_ssl.c +++ b/ssl/bio_ssl.c @@ -348,7 +348,11 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr) break; case BIO_C_SET_SSL: if (ssl != NULL) + { ssl_free(b); + if (!ssl_new(b)) + return 0; + } b->shutdown=(int)num; ssl=(SSL *)ptr; ((BIO_SSL *)b->ptr)->ssl=ssl;