Re-add x509 and crl fuzzer
authorKurt Roeckx <kurt@roeckx.be>
Fri, 1 Jul 2016 14:42:15 +0000 (16:42 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Fri, 1 Jul 2016 15:02:33 +0000 (17:02 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1276

fuzz/build.info
fuzz/build.info.fuzz
fuzz/crl.c
fuzz/x509.c
test/recipes/05-test_fuzz.t

index 861f4ef..c920e95 100644 (file)
@@ -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
index fafc1df..1c0506b 100644 (file)
@@ -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 -}
index 4dd5b3b..728943f 100644 (file)
 #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;
index cc6ff83..b2851f1 100644 (file)
 #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;
index f5ae228..ec5c5ad 100755 (executable)
@@ -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) {