diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-05-25 17:16:10 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-05-25 17:16:10 +0200 |
commit | fd60dfa0f2a9175f83955d6ad730392aa039aa5b (patch) | |
tree | 3837927475fdd2615f23f9534c48eb2e93e646ac /ssl | |
parent | PR: 2527 (diff) | |
download | openssl-fd60dfa0f2a9175f83955d6ad730392aa039aa5b.tar.xz openssl-fd60dfa0f2a9175f83955d6ad730392aa039aa5b.zip |
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')
-rw-r--r-- | ssl/bio_ssl.c | 4 |
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; |