Fix assertion failure in SSL_set_bio()
authorMatt Caswell <matt@openssl.org>
Mon, 16 Apr 2018 13:06:56 +0000 (14:06 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 17 Apr 2018 16:02:33 +0000 (17:02 +0100)
If SSL_set_bio() is called with a NULL wbio after a failed connection then
this can trigger an assertion failure. This should be valid behaviour and
the assertion is in fact invalid and can simply be removed.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5966)

ssl/ssl_lib.c

index b1d78dc35ef35faaa30a862b53b048a3fca0a850..1e24f8446dcc161160405362ff9bcf084162aba3 100644 (file)
@@ -3844,8 +3844,6 @@ int ssl_free_wbio_buffer(SSL *s)
         return 1;
 
     s->wbio = BIO_pop(s->wbio);
-    if (!ossl_assert(s->wbio != NULL))
-        return 0;
     BIO_free(s->bbio);
     s->bbio = NULL;