| Index: testing/libfuzzer/fuzzers/nss/asn1_algorithmid_fuzzer.cc
|
| diff --git a/components/webcrypto/rsa_import_key_spki_fuzzer.cc b/testing/libfuzzer/fuzzers/nss/asn1_algorithmid_fuzzer.cc
|
| similarity index 50%
|
| copy from components/webcrypto/rsa_import_key_spki_fuzzer.cc
|
| copy to testing/libfuzzer/fuzzers/nss/asn1_algorithmid_fuzzer.cc
|
| index e91b1403738b8f35258a74895ab741f9c1ce4679..ffbbb17b90d2ec51691326438fffdd5d18d6ea22 100644
|
| --- a/components/webcrypto/rsa_import_key_spki_fuzzer.cc
|
| +++ b/testing/libfuzzer/fuzzers/nss/asn1_algorithmid_fuzzer.cc
|
| @@ -2,14 +2,18 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <secoid.h>
|
| #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::ImportRsaKeyFromDerFuzzData(data, size,
|
| - blink::WebCryptoKeyFormatSpki);
|
| + NSSFuzzOneInput<SECAlgorithmID, SEC_QuickDERDecodeItem>(
|
| + SEC_ASN1_GET(SECOID_AlgorithmIDTemplate), data, size);
|
| + NSSFuzzOneInput<SECAlgorithmID, SEC_ASN1DecodeItem>(
|
| + SEC_ASN1_GET(SECOID_AlgorithmIDTemplate), data, size);
|
| +
|
| return 0;
|
| }
|
|
|