From c4b2eb24b326b74e549c70a4c228c3ba4327c64c Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 25 May 2011 15:15:43 +0000 Subject: [PATCH] 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. --- ssl/bio_ssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index 420deb7fc9..f0a031c71d 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; -- 2.25.1