• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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 "base/memory/scoped_refptr.h"
9 #include "net/cert/ct_serialization.h"
10 #include "net/cert/signed_certificate_timestamp.h"
11 
12 using net::ct::DecodeSignedCertificateTimestamp;
13 using net::ct::SignedCertificateTimestamp;
14 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)15 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
16   scoped_refptr<SignedCertificateTimestamp> sct;
17   base::StringPiece buffer(reinterpret_cast<const char*>(data), size);
18   DecodeSignedCertificateTimestamp(&buffer, &sct);
19   return 0;
20 }
21