blob: da931a26ecf7c348c780ed0baa4cb7954555aa6e [file] [log] [blame]
vasilvva7300b82020-04-20 20:32:51 -04001// Copyright 2020 The Chromium Authors. All rights reserved.
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 <string>
6
QUICHE team5be974e2020-12-29 18:35:24 -05007#include "quic/core/crypto/certificate_view.h"
vasilvva7300b82020-04-20 20:32:51 -04008
9extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
10 std::string input(reinterpret_cast<const char*>(data), size);
11
vasilvv4af932c2020-10-30 15:09:58 -070012 std::unique_ptr<quic::CertificateView> view =
13 quic::CertificateView::ParseSingleCertificate(input);
14 if (view != nullptr) {
15 view->GetHumanReadableSubject();
16 }
vasilvva7300b82020-04-20 20:32:51 -040017 quic::CertificatePrivateKey::LoadFromDer(input);
18 return 0;
19}