[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Mon Oct 4 08:59:11 UTC 2021


The branch openssl-3.0 has been updated
       via  0569756be7cda9d40a9e68bfb34980dcafccaae1 (commit)
      from  64d0cdc0742f3a3376d8dc6606311ee01bdb2bad (commit)


- Log -----------------------------------------------------------------
commit 0569756be7cda9d40a9e68bfb34980dcafccaae1
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Mon Sep 27 14:22:40 2021 +0200

    Fix ssl_free() and thus BIO_free() to respect BIO_NOCLOSE
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16688)
    
    (cherry picked from commit dce910af3bb135bd6d7c5a4cc512043b3ad4acc1)

-----------------------------------------------------------------------

Summary of changes:
 ssl/bio_ssl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index 43747785f0..401178f0c2 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -76,13 +76,12 @@ static int ssl_free(BIO *a)
     if (a == NULL)
         return 0;
     bs = BIO_get_data(a);
-    if (bs->ssl != NULL)
-        SSL_shutdown(bs->ssl);
     if (BIO_get_shutdown(a)) {
+        if (bs->ssl != NULL)
+            SSL_shutdown(bs->ssl);
         if (BIO_get_init(a))
             SSL_free(bs->ssl);
-        /* Clear all flags */
-        BIO_clear_flags(a, ~0);
+        BIO_clear_flags(a, ~0); /* Clear all flags */
         BIO_set_init(a, 0);
     }
     OPENSSL_free(bs);


More information about the openssl-commits mailing list