Index: testing/libfuzzer/fuzzers/nss/asn1_bmpstring_fuzzer.cc |
diff --git a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc b/testing/libfuzzer/fuzzers/nss/asn1_bmpstring_fuzzer.cc |
similarity index 54% |
copy from components/webcrypto/ec_import_key_pkcs8_fuzzer.cc |
copy to testing/libfuzzer/fuzzers/nss/asn1_bmpstring_fuzzer.cc |
index 154004cb22e4a093525a2dc74d497ad33499ce6b..b81f4f3dcc8191bf23c45c06e92dd2c63bf9cdd8 100644 |
--- a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc |
+++ b/testing/libfuzzer/fuzzers/nss/asn1_bmpstring_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_BMPStringTemplate), data, size); |
+ NSSFuzzOneInput<SECItem, SEC_ASN1DecodeItem>( |
+ SEC_ASN1_GET(SEC_BMPStringTemplate), data, size); |
+ |
return 0; |
} |