[openssl-commits] [openssl] OpenSSL_1_0_0-stable update

Matt Caswell matt at openssl.org
Wed Mar 11 10:58:53 UTC 2015


The branch OpenSSL_1_0_0-stable has been updated
       via  683f03e4881ffd19b8671f290387cd4e68fad457 (commit)
      from  765e2465cace18be949bd537edf153f9445eb1fc (commit)


- Log -----------------------------------------------------------------
commit 683f03e4881ffd19b8671f290387cd4e68fad457
Author: Matt Caswell <matt at openssl.org>
Date:   Mon Mar 9 13:59:58 2015 +0000

    Cleanse buffers
    
    Cleanse various intermediate buffers used by the PRF (backported version
    from master).
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (cherry picked from commit 35fafc4dbc0b3a717ad1b208fe2867e8c64867de)
    
    Conflicts:
    	ssl/s3_enc.c
    
    Conflicts:
    	ssl/t1_enc.c

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

Summary of changes:
 ssl/s3_enc.c | 1 +
 ssl/t1_enc.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 7c3a38c..247efdc 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -830,6 +830,7 @@ int ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
         ret += n;
     }
     EVP_MD_CTX_cleanup(&ctx);
+    OPENSSL_cleanse(buf, sizeof buf);
     return (ret);
 }
 
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index acef20b..c233827 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -860,6 +860,8 @@ int tls1_final_finish_mac(SSL *s,
         err = 1;
     EVP_MD_CTX_cleanup(&ctx);
 
+    OPENSSL_cleanse(buf, (int)(q - buf));
+    OPENSSL_cleanse(buf2, sizeof(buf2));
     if (err)
         return 0;
     else
@@ -1017,6 +1019,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
              co, col,
              s->s3->server_random, SSL3_RANDOM_SIZE,
              so, sol, p, len, s->session->master_key, buff, sizeof buff);
+    OPENSSL_cleanse(buff, sizeof buff);
 
 #ifdef KSSL_DEBUG
     printf("tls1_generate_master_secret() complete\n");


More information about the openssl-commits mailing list