1 // 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 7 #include "quiche/quic/core/crypto/certificate_view.h" 8 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)9extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 10 std::string input(reinterpret_cast<const char*>(data), size); 11 12 std::unique_ptr<quic::CertificateView> view = 13 quic::CertificateView::ParseSingleCertificate(input); 14 if (view != nullptr) { 15 view->GetHumanReadableSubject(); 16 } 17 quic::CertificatePrivateKey::LoadFromDer(input); 18 return 0; 19 } 20