Pārlūkot izejas kodu

Have fuzz/cert.cc also call X509_get_pubkey.

crypto/x509 parses the SPKI on-demand, so we weren't actually exercising the
SPKI code.

Change-Id: I2e16045bd35dbe04d4b8d8b45939c8885e09a550
Reviewed-on: https://boringssl-review.googlesource.com/7161
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin pirms 8 gadiem
committed by Adam Langley
vecāks
revīzija
f48fcaf901
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. +6
    -1
      fuzz/cert.cc

+ 6
- 1
fuzz/cert.cc Parādīt failu

@@ -2,6 +2,11 @@

extern "C" int LLVMFuzzerTestOneInput(uint8_t *buf, size_t len) {
const uint8_t *bufp = buf;
X509_free(d2i_X509(NULL, &bufp, len));
X509 *x509 = d2i_X509(NULL, &bufp, len);
if (x509 != NULL) {
/* Also extract the public key. */
EVP_PKEY_free(X509_get_pubkey(x509));
}
X509_free(x509);
return 0;
}

Notiek ielāde…
Atcelt
Saglabāt