[openssl-commits] [openssl] master update

Kurt Roeckx kurt at openssl.org
Fri Jul 1 15:02:51 UTC 2016


The branch master has been updated
       via  a05b0bcf878c8c52824e8ee4bb6c1853fa23800b (commit)
       via  dd850bcb395753a130a5d69697092d69555b6e2c (commit)
       via  453bff226796f52694f7189c141c33a996458636 (commit)
      from  152d26461609ae36f329d6f48b2d0749e43834f3 (commit)


- Log -----------------------------------------------------------------
commit a05b0bcf878c8c52824e8ee4bb6c1853fa23800b
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Fri Jul 1 16:42:15 2016 +0200

    Re-add x509 and crl fuzzer
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    
    GH: #1276

commit dd850bcb395753a130a5d69697092d69555b6e2c
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Wed Jun 29 11:45:51 2016 +0200

    Add old locking constants back
    
    Fixes #1260
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    
    GH: #1266

commit 453bff226796f52694f7189c141c33a996458636
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Wed Jun 29 11:46:39 2016 +0200

    Make CRYPTO_num_locks() return 1
    
    malloc(0) might return NULL and code for the old callbacks might fail,
    instead just say they should allocate 1 entry.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    
    GH: #1266

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

Summary of changes:
 fuzz/build.info             | 10 +++++++++-
 fuzz/build.info.fuzz        | 10 +++++++++-
 fuzz/crl.c                  |  4 ++++
 fuzz/x509.c                 |  4 ++++
 include/openssl/crypto.h    | 12 +++++++++++-
 test/recipes/05-test_fuzz.t |  2 +-
 6 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/fuzz/build.info b/fuzz/build.info
index 861f4ef..c920e95 100644
--- a/fuzz/build.info
+++ b/fuzz/build.info
@@ -1,5 +1,5 @@
 {- use File::Spec::Functions qw/catdir rel2abs/; -}
-PROGRAMS=asn1-test asn1parse-test bignum-test bndiv-test cms-test conf-test ct-test server-test
+PROGRAMS=asn1-test asn1parse-test bignum-test bndiv-test cms-test conf-test crl-test ct-test server-test x509-test
 
 SOURCE[asn1-test]=asn1.c test-corpus.c
 INCLUDE[asn1-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
@@ -25,6 +25,10 @@ SOURCE[conf-test]=conf.c test-corpus.c
 INCLUDE[conf-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
 DEPEND[conf-test]=../libcrypto
 
+SOURCE[crl-test]=crl.c test-corpus.c
+INCLUDE[crl-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
+DEPEND[crl-test]=../libcrypto
+
 SOURCE[ct-test]=ct.c test-corpus.c
 INCLUDE[ct-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
 DEPEND[ct-test]=../libcrypto
@@ -32,3 +36,7 @@ DEPEND[ct-test]=../libcrypto
 SOURCE[server-test]=server.c test-corpus.c
 INCLUDE[server-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
 DEPEND[server-test]=../libcrypto ../libssl
+
+SOURCE[x509-test]=x509.c test-corpus.c
+INCLUDE[x509-test]="{- rel2abs(catdir($builddir,"../include")) -}" ../include
+DEPEND[x509-test]=../libcrypto
diff --git a/fuzz/build.info.fuzz b/fuzz/build.info.fuzz
index fafc1df..1c0506b 100644
--- a/fuzz/build.info.fuzz
+++ b/fuzz/build.info.fuzz
@@ -8,7 +8,7 @@
    ""
 -}
 
-PROGRAMS=asn1 asn1parse bignum bndiv cms conf ct server
+PROGRAMS=asn1 asn1parse bignum bndiv cms conf crl ct server x509
 
 SOURCE[asn1]=asn1.c driver.c
 INCLUDE[asn1]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
@@ -34,6 +34,10 @@ SOURCE[conf]=conf.c driver.c
 INCLUDE[conf]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
 DEPEND[conf]=../libcrypto {- $ex_lib -}
 
+SOURCE[crl]=crl.c driver.c
+INCLUDE[crl]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
+DEPEND[crl]=../libcrypto {- $ex_lib -}
+
 SOURCE[ct]=ct.c driver.c
 INCLUDE[ct]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
 DEPEND[ct]=../libcrypto {- $ex_lib -}
@@ -41,3 +45,7 @@ DEPEND[ct]=../libcrypto {- $ex_lib -}
 SOURCE[server]=server.c driver.c
 INCLUDE[server]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
 DEPEND[server]=../libcrypto ../libssl {- $ex_lib -}
+
+SOURCE[x509]=x509.c driver.c
+INCLUDE[x509]="{- rel2abs(catdir($builddir,"../include")) -}" ../include {- $ex_inc -}
+DEPEND[x509]=../libcrypto {- $ex_lib -}
diff --git a/fuzz/crl.c b/fuzz/crl.c
index 4dd5b3b..728943f 100644
--- a/fuzz/crl.c
+++ b/fuzz/crl.c
@@ -12,6 +12,10 @@
 #include <openssl/bio.h>
 #include "fuzzer.h"
 
+int FuzzerInitialize(int *argc, char ***argv) {
+    return 1;
+}
+
 int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
     const unsigned char *p = buf;
     unsigned char *der = NULL;
diff --git a/fuzz/x509.c b/fuzz/x509.c
index cc6ff83..b2851f1 100644
--- a/fuzz/x509.c
+++ b/fuzz/x509.c
@@ -12,6 +12,10 @@
 #include <openssl/bio.h>
 #include "fuzzer.h"
 
+int FuzzerInitialize(int *argc, char ***argv) {
+    return 1;
+}
+
 int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
     const unsigned char *p = buf;
     unsigned char *der = NULL;
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 2e056c5..acdb48b 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -215,12 +215,22 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
  * On the other hand, the locking callbacks are no longer used.  Consequently,
  * the callback management functions can be safely replaced with no-op macros.
  */
-#  define CRYPTO_num_locks()            (0)
+#  define CRYPTO_num_locks()            (1)
 #  define CRYPTO_set_locking_callback(func)
 #  define CRYPTO_get_locking_callback()         (NULL)
 #  define CRYPTO_set_add_lock_callback(func)
 #  define CRYPTO_get_add_lock_callback()        (NULL)
 
+/*
+ * These defines where used in combination with the old locking callbacks,
+ * they are not called anymore, but old code that's not called might still
+ * use them.
+ */
+#  define CRYPTO_LOCK             1
+#  define CRYPTO_UNLOCK           2
+#  define CRYPTO_READ             4
+#  define CRYPTO_WRITE            8
+
 /* This structure is no longer used */
 typedef struct crypto_threadid_st {
     int dummy;
diff --git a/test/recipes/05-test_fuzz.t b/test/recipes/05-test_fuzz.t
index f5ae228..ec5c5ad 100755
--- a/test/recipes/05-test_fuzz.t
+++ b/test/recipes/05-test_fuzz.t
@@ -14,7 +14,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
 
 setup("test_fuzz");
 
-my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'cms', 'conf', 'ct', 'server');
+my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'cms', 'conf', 'crl', 'ct', 'server', 'x509');
 plan tests => scalar @fuzzers;
 
 foreach my $f (@fuzzers) {


More information about the openssl-commits mailing list