Index: testing/libfuzzer/fuzzers/nss/asn1_null_fuzzer.cc |
diff --git a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc b/testing/libfuzzer/fuzzers/nss/asn1_null_fuzzer.cc |
similarity index 54% |
copy from components/webcrypto/ec_import_key_pkcs8_fuzzer.cc |
copy to testing/libfuzzer/fuzzers/nss/asn1_null_fuzzer.cc |
index 154004cb22e4a093525a2dc74d497ad33499ce6b..e553bc9057d7c9d9197983a1a2b04dec74cf887f 100644 |
--- a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc |
+++ b/testing/libfuzzer/fuzzers/nss/asn1_null_fuzzer.cc |
@@ -5,11 +5,14 @@ |
#include <stddef.h> |
#include <stdint.h> |
-#include "components/webcrypto/fuzzer_support.h" |
+#include "testing/libfuzzer/fuzzers/nss/asn1_fuzzer_template.h" |
// Entry point for LibFuzzer. |
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
- webcrypto::ImportEcKeyFromDerFuzzData(data, size, |
- blink::WebCryptoKeyFormatPkcs8); |
+ NSSFuzzOneInput<SECItem, SEC_QuickDERDecodeItem>( |
+ SEC_ASN1_GET(SEC_NullTemplate), data, size); |
+ NSSFuzzOneInput<SECItem, SEC_ASN1DecodeItem>( |
+ SEC_ASN1_GET(SEC_NullTemplate), data, size); |
+ |
return 0; |
} |