Coverage Report

Created: 2025-08-28 09:57

/src/node/test/fuzzers/fuzz_ParsePublicKey.cc
Line
Count
Source
1
/*
2
 * A fuzzer focused on FuzzParsePublicKeyPEM
3
 */
4
5
#include <stdlib.h>
6
#include "crypto/crypto_context.h"
7
#include "crypto/crypto_util.h"
8
#include "crypto/crypto_keys.h"
9
#include "fuzz_helper.h"
10
11
using EVPKeyPointer = node::DeleteFnPtr<EVP_PKEY, EVP_PKEY_free>;
12
13
33.0k
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
14
33.0k
  EVPKeyPointer pkey;
15
33.0k
  node::crypto::ManagedEVPPKey mk;
16
33.0k
  mk.FuzzParsePublicKeyPEM(&pkey, reinterpret_cast<const char*>(data), size);
17
33.0k
  return 0;
18
33.0k
}