grpc
third_party
boringssl-with-bazel
src
fuzz
fuzz/pkcs12.cc
Go to the documentation of this file.
1
/* Copyright (c) 2018, Google Inc.
2
*
3
* Permission to use, copy, modify, and/or distribute this software for any
4
* purpose with or without fee is hereby granted, provided that the above
5
* copyright notice and this permission notice appear in all copies.
6
*
7
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
14
15
#include <
openssl/bytestring.h
>
16
#include <
openssl/evp.h
>
17
#include <
openssl/pkcs8.h
>
18
#include <
openssl/x509.h
>
19
20
21
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
buf
,
size_t
len
) {
22
bssl::UniquePtr
<
STACK_OF
(
X509
)> certs(
sk_X509_new_null
());
23
EVP_PKEY
*
key
=
nullptr
;
24
CBS
cbs
;
25
CBS_init
(&
cbs
,
buf
,
len
);
26
PKCS12_get_key_and_certs
(&
key
, certs.get(), &
cbs
,
"foo"
);
27
EVP_PKEY_free
(
key
);
28
return
0;
29
}
cbs_st
Definition:
bytestring.h:39
PKCS12_get_key_and_certs
#define PKCS12_get_key_and_certs
Definition:
boringssl_prefix_symbols.h:2006
evp.h
buf
voidpf void * buf
Definition:
bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
pkcs8.h
cbs
const CBS * cbs
Definition:
third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h:107
CBS_init
#define CBS_init
Definition:
boringssl_prefix_symbols.h:1085
uint8_t
unsigned char uint8_t
Definition:
stdint-msvc2008.h:78
bytestring.h
evp_pkey_st
Definition:
evp.h:1046
STACK_OF
#define STACK_OF(type)
Definition:
stack.h:125
EVP_PKEY_free
#define EVP_PKEY_free
Definition:
boringssl_prefix_symbols.h:1625
grpc_core::UniquePtr
std::unique_ptr< T, DefaultDeleteChar > UniquePtr
Definition:
src/core/lib/gprpp/memory.h:43
key
const char * key
Definition:
hpack_parser_table.cc:164
x509_st
Definition:
third_party/boringssl-with-bazel/src/crypto/x509/internal.h:139
sk_X509_new_null
#define sk_X509_new_null
Definition:
boringssl_prefix_symbols.h:586
len
int len
Definition:
abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
Definition:
fuzz/pkcs12.cc:21
x509.h
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:43