summaryrefslogtreecommitdiffstats
path: root/ssl/bio_ssl.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-25 15:16:01 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-25 15:16:01 +0000
commit24dd0c61ef76309d97c60870b6f284341f33bcca (patch)
treec13e9ae86913c569a4437d53f6c81499fa9ca3f1 /ssl/bio_ssl.c
parent565c15363c0530f890f58283e5a43dbfe17ea7fd (diff)
PR: 2529
Submitted by: Marcus Meissner <meissner@suse.de> Reviewed by: steve Call ssl_new() to reallocate SSL BIO internals if we want to replace the existing internal SSL structure.
Diffstat (limited to 'ssl/bio_ssl.c')
-rw-r--r--ssl/bio_ssl.c4
1 files changed, 4 insertions, 0 deletions
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;