Install custom RAND_METHOD for fuzzing
[openssl.git] / fuzz / asn1.c
index 0c6131580cbb131b2b7fca783a8b3bd0e0b33c69..90262defd343d8ba622f67ecea013b6a85a9222f 100644 (file)
@@ -28,6 +28,7 @@
 #include <openssl/x509v3.h>
 #include <openssl/cms.h>
 #include <openssl/err.h>
+#include <openssl/rand.h>
 #include "fuzzer.h"
 
 static ASN1_ITEM_EXP *item_type[] = {
@@ -210,6 +211,7 @@ int FuzzerInitialize(int *argc, char ***argv)
     OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
     ERR_get_state();
     CRYPTO_free_ex_index(0, -1);
+    FuzzerSetRand();
 
     return 1;
 }