Lagom/Fuzzers: Add fuzzer for the LibTLS ASN1 parser

This commit is contained in:
Brian Gianforcaro 2021-09-18 00:35:28 -07:00 committed by Brian Gianforcaro
parent 3f5a6be69f
commit 4f5d71b4e8
Notes: sideshowbarker 2024-07-18 03:43:27 +09:00
2 changed files with 17 additions and 0 deletions

View file

@ -43,6 +43,7 @@ add_simple_fuzzer(FuzzMarkdown LagomMarkdown)
add_simple_fuzzer(FuzzRegexECMA262 LagomRegex)
add_simple_fuzzer(FuzzRegexPosixBasic LagomRegex)
add_simple_fuzzer(FuzzRegexPosixExtended LagomRegex)
add_simple_fuzzer(FuzzASN1 LagomCrypto LagomTLS)
add_simple_fuzzer(FuzzSHA1 LagomCrypto)
add_simple_fuzzer(FuzzSHA256 LagomCrypto)
add_simple_fuzzer(FuzzSHA384 LagomCrypto)

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibTLS/Certificate.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
(void)TLS::Certificate::parse_asn1({ data, size });
return 0;
}