[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Tue Mar 27 16:16:59 UTC 2018


The branch master has been updated
       via  37a385956461ab526ecea2739a8a40364a8db259 (commit)
       via  320a81277e402f393289ae7229b2320324321fb1 (commit)
      from  9d5db9c9ab9b9f2f2a5ce9795405e8334cd2ce66 (commit)


- Log -----------------------------------------------------------------
commit 37a385956461ab526ecea2739a8a40364a8db259
Author: Matt Caswell <matt at openssl.org>
Date:   Mon Mar 26 23:36:37 2018 +0100

    Temporarily disable some tests that hang
    
    The previous commit causes some tests to hang so we temporarily disable them.
    
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/5757)

commit 320a81277e402f393289ae7229b2320324321fb1
Author: Matt Caswell <matt at openssl.org>
Date:   Mon Mar 26 19:12:25 2018 +0100

    Remove some code for a contributor that we cannot find
    
    This removes some code because we cannot trace the original contributor
    to get their agreement for the licence change (original commit e03ddfae).
    
    After this change there will be numerous failures in the test cases until
    someone rewrites the missing code.
    
    All *_free functions should accept a NULL parameter. After this change
    the following *_free functions will fail if a NULL parameter is passed:
    
    BIO_ACCEPT_free()
    BIO_CONNECT_free()
    BN_BLINDING_free()
    BN_CTX_free()
    BN_MONT_CTX_free()
    BN_RECP_CTX_free()
    BUF_MEM_free()
    COMP_CTX_free()
    ERR_STATE_free()
    TXT_DB_free()
    X509_STORE_free()
    ssl3_free()
    ssl_cert_free()
    SSL_SESSION_free()
    SSL_free()
    
    [skip ci]
    
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/5757)

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

Summary of changes:
 crypto/bio/bss_acpt.c       | 3 ---
 crypto/bio/bss_conn.c       | 3 ---
 crypto/bn/bn_blind.c        | 3 ---
 crypto/bn/bn_ctx.c          | 2 --
 crypto/bn/bn_mont.c         | 3 ---
 crypto/bn/bn_recp.c         | 3 ---
 crypto/buffer/buffer.c      | 3 ---
 crypto/comp/comp_lib.c      | 3 ---
 crypto/err/err.c            | 3 ---
 crypto/txt_db/txt_db.c      | 3 ---
 crypto/x509/x509_lu.c       | 3 ---
 ssl/s3_lib.c                | 2 +-
 ssl/ssl_cert.c              | 3 ---
 ssl/ssl_lib.c               | 3 ---
 ssl/ssl_sess.c              | 3 ---
 test/recipes/99-test_fuzz.t | 4 ++++
 util/perl/TLSProxy/Proxy.pm | 5 +++++
 17 files changed, 10 insertions(+), 42 deletions(-)

diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index b7ec0c0..0171c49 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -101,9 +101,6 @@ static BIO_ACCEPT *BIO_ACCEPT_new(void)
 
 static void BIO_ACCEPT_free(BIO_ACCEPT *a)
 {
-    if (a == NULL)
-        return;
-
     OPENSSL_free(a->param_addr);
     OPENSSL_free(a->param_serv);
     BIO_ADDRINFO_free(a->addr_first);
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c
index 5c461ae..0fad02f 100644
--- a/crypto/bio/bss_conn.c
+++ b/crypto/bio/bss_conn.c
@@ -232,9 +232,6 @@ BIO_CONNECT *BIO_CONNECT_new(void)
 
 void BIO_CONNECT_free(BIO_CONNECT *a)
 {
-    if (a == NULL)
-        return;
-
     OPENSSL_free(a->param_hostname);
     OPENSSL_free(a->param_service);
     BIO_ADDRINFO_free(a->addr_first);
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c
index 006ad6e..8bd6156 100644
--- a/crypto/bn/bn_blind.c
+++ b/crypto/bn/bn_blind.c
@@ -80,9 +80,6 @@ BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod)
 
 void BN_BLINDING_free(BN_BLINDING *r)
 {
-    if (r == NULL)
-        return;
-
     BN_free(r->A);
     BN_free(r->Ai);
     BN_free(r->e);
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index 68c0468..7202aef 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -156,8 +156,6 @@ BN_CTX *BN_CTX_secure_new(void)
 
 void BN_CTX_free(BN_CTX *ctx)
 {
-    if (ctx == NULL)
-        return;
 #ifdef BN_CTX_DEBUG
     {
         BN_POOL_ITEM *pool = ctx->pool.head;
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c
index 6357c60..bae7d23 100644
--- a/crypto/bn/bn_mont.c
+++ b/crypto/bn/bn_mont.c
@@ -217,9 +217,6 @@ void BN_MONT_CTX_init(BN_MONT_CTX *ctx)
 
 void BN_MONT_CTX_free(BN_MONT_CTX *mont)
 {
-    if (mont == NULL)
-        return;
-
     BN_clear_free(&(mont->RR));
     BN_clear_free(&(mont->N));
     BN_clear_free(&(mont->Ni));
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c
index e873699..923a9b3 100644
--- a/crypto/bn/bn_recp.c
+++ b/crypto/bn/bn_recp.c
@@ -32,9 +32,6 @@ BN_RECP_CTX *BN_RECP_CTX_new(void)
 
 void BN_RECP_CTX_free(BN_RECP_CTX *recp)
 {
-    if (recp == NULL)
-        return;
-
     BN_free(&(recp->N));
     BN_free(&(recp->Nr));
     if (recp->flags & BN_FLG_MALLOCED)
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index cbd2e53..dfa5c23 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -42,9 +42,6 @@ BUF_MEM *BUF_MEM_new(void)
 
 void BUF_MEM_free(BUF_MEM *a)
 {
-    if (a == NULL)
-        return;
-
     if (a->data != NULL) {
         if (a->flags & BUF_MEM_FLAG_SECURE)
             OPENSSL_secure_clear_free(a->data, a->max);
diff --git a/crypto/comp/comp_lib.c b/crypto/comp/comp_lib.c
index 137a5db..5bed187 100644
--- a/crypto/comp/comp_lib.c
+++ b/crypto/comp/comp_lib.c
@@ -45,9 +45,6 @@ const char *COMP_get_name(const COMP_METHOD *meth)
 
 void COMP_CTX_free(COMP_CTX *ctx)
 {
-    if (ctx == NULL)
-        return;
-
     if (ctx->meth->finish != NULL)
         ctx->meth->finish(ctx);
 
diff --git a/crypto/err/err.c b/crypto/err/err.c
index c0a6b2b..4ae6178 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -256,9 +256,6 @@ static void ERR_STATE_free(ERR_STATE *s)
 {
     int i;
 
-    if (s == NULL)
-        return;
-
     for (i = 0; i < ERR_NUM_ERRORS; i++) {
         err_clear_data(s, i);
     }
diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c
index d685962..a08f346 100644
--- a/crypto/txt_db/txt_db.c
+++ b/crypto/txt_db/txt_db.c
@@ -284,9 +284,6 @@ void TXT_DB_free(TXT_DB *db)
     int i, n;
     char **p, *max;
 
-    if (db == NULL)
-        return;
-
     if (db->index != NULL) {
         for (i = db->num_fields - 1; i >= 0; i--)
             lh_OPENSSL_STRING_free(db->index[i]);
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index b8845f1..d69cedb 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -178,9 +178,6 @@ void X509_STORE_free(X509_STORE *vfy)
     STACK_OF(X509_LOOKUP) *sk;
     X509_LOOKUP *lu;
 
-    if (vfy == NULL)
-        return;
-
     CRYPTO_DOWN_REF(&vfy->references, &i, vfy->lock);
     REF_PRINT_COUNT("X509_STORE", vfy);
     if (i > 0)
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 6193269..78a5a3a 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3312,7 +3312,7 @@ int ssl3_new(SSL *s)
 
 void ssl3_free(SSL *s)
 {
-    if (s == NULL || s->s3 == NULL)
+    if (s->s3 == NULL)
         return;
 
     ssl3_cleanup_key_block(s);
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 6078f9f..5a465e3 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -225,9 +225,6 @@ void ssl_cert_free(CERT *c)
 {
     int i;
 
-    if (c == NULL)
-        return;
-
     CRYPTO_DOWN_REF(&c->references, &i, c->lock);
     REF_PRINT_COUNT("CERT", c);
     if (i > 0)
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index b66cd71..b678fcf 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1125,9 +1125,6 @@ void SSL_free(SSL *s)
 {
     int i;
 
-    if (s == NULL)
-        return;
-
     CRYPTO_DOWN_REF(&s->references, &i, s->lock);
     REF_PRINT_COUNT("SSL", s);
     if (i > 0)
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 7d94b57..1672cd2 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -785,9 +785,6 @@ void SSL_SESSION_free(SSL_SESSION *ss)
 {
     int i;
 
-    if (ss == NULL)
-        return;
-
     CRYPTO_DOWN_REF(&ss->references, &i, ss->lock);
     REF_PRINT_COUNT("SSL_SESSION", ss);
     if (i > 0)
diff --git a/test/recipes/99-test_fuzz.t b/test/recipes/99-test_fuzz.t
index 9322ff7..02fa140 100644
--- a/test/recipes/99-test_fuzz.t
+++ b/test/recipes/99-test_fuzz.t
@@ -15,6 +15,10 @@ use OpenSSL::Test::Utils;
 
 setup("test_fuzz");
 
+# TODO vvvv Remove this line
+plan skip_all => "TLSProxy isn't usable on $^O";
+# TODO ^^^^ Remove this line
+
 my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'client', 'conf', 'crl', 'server', 'x509');
 if (!disabled("cms")) {
     push @fuzzers, 'cms';
diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index 0b90159..55d45a8 100644
--- a/util/perl/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
@@ -68,6 +68,11 @@ sub new
         message_list => [],
     };
 
+    ### TODO vvvv REMOVE THIS AGAIN
+    warn "Proxy tests temporarily disabled!\n";
+    $self->{proxy_sock} = 0;
+    return bless $self, $class;
+    ### TODO ^^^^ REMOVE THIS AGAIN
     # IO::Socket::IP is on the core module list, IO::Socket::INET6 isn't.
     # However, IO::Socket::INET6 is older and is said to be more widely
     # deployed for the moment, and may have less bugs, so we try the latter


More information about the openssl-commits mailing list