Bob Beck | 3aecf1d | 2023-09-08 11:56:02 -0600 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include <stddef.h> |
| 6 | #include <stdint.h> |
| 7 | |
| 8 | #include "../pki/parse_certificate.h" |
| 9 | #include "../pki/input.h" |
| 10 | #include <openssl/base.h> |
| 11 | |
| 12 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 13 | std::vector<bssl::ParsedDistributionPoint> distribution_points; |
| 14 | |
| 15 | bool success = ParseCrlDistributionPoints(bssl::der::Input(data, size), |
| 16 | &distribution_points); |
| 17 | |
| 18 | if (success) { |
| 19 | // A valid CRLDistributionPoints must have at least 1 element. |
| 20 | BSSL_CHECK(!distribution_points.empty()); |
| 21 | } |
| 22 | |
| 23 | return 0; |
| 24 | } |