mirror of
https://boringssl.googlesource.com/boringssl
synced 2026-07-21 14:43:51 +00:00
Move the fuzzers into the fuzz directory and make them build.
Change-Id: I9346a4bf48d756da254dc27842cd645a3a69f847 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62045 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
committed by
Boringssl LUCI CQ
parent
9f4cad2208
commit
257bfaa329
+13
-1
@@ -22,10 +22,20 @@ fuzzer(bn_mod_exp)
|
||||
fuzzer(cert)
|
||||
fuzzer(client ssl)
|
||||
fuzzer(conf)
|
||||
fuzzer(crl_getcrlstatusforcert_fuzzer pki)
|
||||
fuzzer(crl_parse_crl_certificatelist_fuzzer pki)
|
||||
fuzzer(crl_parse_crl_tbscertlist_fuzzer pki)
|
||||
fuzzer(crl_parse_issuing_distribution_point_fuzzer pki)
|
||||
fuzzer(decode_client_hello_inner ssl)
|
||||
fuzzer(der_roundtrip)
|
||||
fuzzer(dtls_client ssl)
|
||||
fuzzer(dtls_server ssl)
|
||||
fuzzer(ocsp_parse_ocsp_cert_id_fuzzer pki)
|
||||
fuzzer(ocsp_parse_ocsp_response_data_fuzzer pki)
|
||||
fuzzer(ocsp_parse_ocsp_response_fuzzer pki)
|
||||
fuzzer(ocsp_parse_ocsp_single_response_fuzzer pki)
|
||||
fuzzer(parse_authority_key_identifier_fuzzer pki)
|
||||
fuzzer(parse_certificate_fuzzer pki)
|
||||
fuzzer(pkcs12)
|
||||
fuzzer(pkcs8)
|
||||
fuzzer(privkey)
|
||||
@@ -34,4 +44,6 @@ fuzzer(server ssl)
|
||||
fuzzer(session ssl)
|
||||
fuzzer(spki)
|
||||
fuzzer(ssl_ctx_api ssl)
|
||||
fuzzer(parse_certificate_fuzzer pki)
|
||||
fuzzer(verify_name_match_fuzzer pki)
|
||||
fuzzer(verify_name_match_normalizename_fuzzer pki)
|
||||
fuzzer(verify_name_match_verifynameinsubtree_fuzzer pki)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "crl.h"
|
||||
#include "input.h"
|
||||
#include "../pki/crl.h"
|
||||
#include "../pki/input.h"
|
||||
#include <openssl/sha.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
@@ -15,14 +15,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
|
||||
uint8_t data_hash[SHA256_DIGEST_LENGTH];
|
||||
SHA256(data, size, data_hash);
|
||||
const net::CrlVersion crl_version =
|
||||
(data_hash[0] % 2) ? net::CrlVersion::V2 : net::CrlVersion::V1;
|
||||
const bssl::CrlVersion crl_version =
|
||||
(data_hash[0] % 2) ? bssl::CrlVersion::V2 : bssl::CrlVersion::V1;
|
||||
const size_t serial_len = data_hash[1] % (sizeof(data_hash) - 2);
|
||||
assert(serial_len + 2 < sizeof(data_hash));
|
||||
const bssl::der::Input cert_serial(
|
||||
reinterpret_cast<const uint8_t*>(data_hash + 2), serial_len);
|
||||
|
||||
net::GetCRLStatusForCert(cert_serial, crl_version,
|
||||
bssl::GetCRLStatusForCert(cert_serial, crl_version,
|
||||
std::make_optional(input_der));
|
||||
|
||||
return 0;
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0#0!ő‚8žVř+ÖRí'íé
|
||||
+3
-3
@@ -7,8 +7,8 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "crl.h"
|
||||
#include "input.h"
|
||||
#include "../pki/crl.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input crl_der(data, size);
|
||||
@@ -17,7 +17,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input signature_algorithm_tlv;
|
||||
bssl::der::BitString signature_value;
|
||||
|
||||
std::ignore = net::ParseCrlCertificateList(
|
||||
std::ignore = bssl::ParseCrlCertificateList(
|
||||
crl_der, &tbs_cert_list_tlv, &signature_algorithm_tlv, &signature_value);
|
||||
|
||||
return 0;
|
||||
Binary file not shown.
@@ -7,14 +7,14 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "crl.h"
|
||||
#include "input.h"
|
||||
#include "../pki/crl.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input input_der(data, size);
|
||||
|
||||
net::ParsedCrlTbsCertList tbs_cert_list;
|
||||
std::ignore = net::ParseCrlTbsCertList(input_der, &tbs_cert_list);
|
||||
bssl::ParsedCrlTbsCertList tbs_cert_list;
|
||||
std::ignore = bssl::ParseCrlTbsCertList(input_der, &tbs_cert_list);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+7
-7
@@ -6,22 +6,22 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "crl.h"
|
||||
#include "input.h"
|
||||
#include "../pki/crl.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input idp_der(data, size);
|
||||
|
||||
std::unique_ptr<net::GeneralNames> distribution_point_names;
|
||||
net::ContainedCertsType only_contains_cert_type;
|
||||
std::unique_ptr<bssl::GeneralNames> distribution_point_names;
|
||||
bssl::ContainedCertsType only_contains_cert_type;
|
||||
|
||||
if (net::ParseIssuingDistributionPoint(idp_der, &distribution_point_names,
|
||||
if (bssl::ParseIssuingDistributionPoint(idp_der, &distribution_point_names,
|
||||
&only_contains_cert_type)) {
|
||||
bool has_distribution_point_names =
|
||||
distribution_point_names &&
|
||||
distribution_point_names->present_name_types != net::GENERAL_NAME_NONE;
|
||||
distribution_point_names->present_name_types != bssl::GENERAL_NAME_NONE;
|
||||
if (!has_distribution_point_names &&
|
||||
only_contains_cert_type == net::ContainedCertsType::ANY_CERTS) {
|
||||
only_contains_cert_type == bssl::ContainedCertsType::ANY_CERTS) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
0 †http://example.com/foo.crl
|
||||
+1
@@ -0,0 +1 @@
|
||||
0��
|
||||
+1
@@ -0,0 +1 @@
|
||||
0+ †http://example.com/foo.crl‚˙�ꀄ˙
|
||||
@@ -0,0 +1 @@
|
||||
0��
|
||||
+1
@@ -0,0 +1 @@
|
||||
0��
|
||||
@@ -0,0 +1 @@
|
||||
0��
|
||||
@@ -0,0 +1 @@
|
||||
0��
|
||||
@@ -0,0 +1 @@
|
||||
0���
|
||||
@@ -5,13 +5,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ocsp.h"
|
||||
#include "input.h"
|
||||
#include "../pki/ocsp.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input cert_id_der(data, size);
|
||||
net::OCSPCertID cert_id;
|
||||
net::ParseOCSPCertID(cert_id_der, &cert_id);
|
||||
bssl::OCSPCertID cert_id;
|
||||
bssl::ParseOCSPCertID(cert_id_der, &cert_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
0;0
|
||||
*�蟄僽����������������������������������������
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
00
|
||||
*├H├В
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0 0+
|
||||
Binary file not shown.
+4
-4
@@ -5,13 +5,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ocsp.h"
|
||||
#include "input.h"
|
||||
#include "../pki/ocsp.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input response_data_der(data, size);
|
||||
net::OCSPResponseData response_data;
|
||||
net::ParseOCSPResponseData(response_data_der, &response_data);
|
||||
bssl::OCSPResponseData response_data;
|
||||
bssl::ParseOCSPResponseData(response_data_der, &response_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0��������������������
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0�
|
||||
@@ -0,0 +1 @@
|
||||
0�
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,13 +5,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ocsp.h"
|
||||
#include "input.h"
|
||||
#include "../pki/ocsp.h"
|
||||
#include "../pki/input.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
bssl::der::Input response_der(data, size);
|
||||
net::OCSPResponse response;
|
||||
net::ParseOCSPResponse(response_der, &response);
|
||||
bssl::OCSPResponse response;
|
||||
bssl::ParseOCSPResponse(response_der, &response);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
0
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
0
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
0
|
||||
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user