summaryrefslogtreecommitdiffstats
path: root/fuzz/asn1.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-12-10 12:04:58 +1000
committerPauli <ppzgs1@gmail.com>2021-02-23 23:24:13 +1000
commitde2ea978b5be4607c677aaefceebff39b1520e0a (patch)
tree919c1c9cc6345ee7358f9abee6eff009ad5d4e87 /fuzz/asn1.c
parent0a89ae97d96275994d96b560400d3fa97f752879 (diff)
RAND_METHOD deprecation: fuzzer
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13652)
Diffstat (limited to 'fuzz/asn1.c')
-rw-r--r--fuzz/asn1.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fuzz/asn1.c b/fuzz/asn1.c
index 15a517a72c..449d851e68 100644
--- a/fuzz/asn1.c
+++ b/fuzz/asn1.c
@@ -40,8 +40,6 @@
#include <internal/nelem.h>
#include "fuzzer.h"
-#include "rand.inc"
-
static ASN1_ITEM_EXP *item_type[] = {
ASN1_ITEM_ref(ACCESS_DESCRIPTION),
#ifndef OPENSSL_NO_RFC3779
@@ -280,6 +278,7 @@ static ASN1_PCTX *pctx;
int FuzzerInitialize(int *argc, char ***argv)
{
+ FuzzerSetRand();
pctx = ASN1_PCTX_new();
ASN1_PCTX_set_flags(pctx, ASN1_PCTX_FLAGS_SHOW_ABSENT |
ASN1_PCTX_FLAGS_SHOW_SEQUENCE | ASN1_PCTX_FLAGS_SHOW_SSOF |
@@ -291,7 +290,6 @@ int FuzzerInitialize(int *argc, char ***argv)
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
ERR_clear_error();
CRYPTO_free_ex_index(0, -1);
- FuzzerSetRand();
return 1;
}
@@ -365,4 +363,5 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
void FuzzerCleanup(void)
{
ASN1_PCTX_free(pctx);
+ FuzzerClearRand();
}