Blame fuzz/fuzzer.h

Packit Service 4684c1
/*
Packit Service 4684c1
 * Copyright(c) 2017 Free Software Foundation, Inc.
Packit Service 4684c1
 *
Packit Service 4684c1
 * GnuTLS is free software: you can redistribute it and/or modify
Packit Service 4684c1
 * it under the terms of the GNU Lesser General Public License as published by
Packit Service 4684c1
 * the Free Software Foundation, either version 3 of the License, or
Packit Service 4684c1
 * (at your option) any later version.
Packit Service 4684c1
 *
Packit Service 4684c1
 * GnuTLS is distributed in the hope that it will be useful,
Packit Service 4684c1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 4684c1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 4684c1
 * GNU Lesser General Public License for more details.
Packit Service 4684c1
 *
Packit Service 4684c1
 * You should have received a copy of the GNU Lesser General Public License
Packit Service 4684c1
 * along with gnutls.  If not, see <https://www.gnu.org/licenses/>.
Packit Service 4684c1
 */
Packit Service 4684c1
Packit Service 4684c1
#include <stddef.h> // size_t
Packit Service 4684c1
#include <stdint.h> // uint8_t
Packit Service 4684c1
#include <gnutls/gnutls.h>
Packit Service 4684c1
Packit Service 4684c1
#if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
Packit Service 4684c1
  #pragma GCC diagnostic ignored "-Wvla-larger-than="
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#ifdef __cplusplus
Packit Service 4684c1
extern "C"
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#define VERS_STR "-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0:+VERS-SSL3.0"
Packit Service 4684c1
Packit Service 4684c1
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
Packit Service 4684c1
Packit Service 4684c1
static void __attribute__((constructor)) init(void)
Packit Service 4684c1
{
Packit Service 4684c1
	gnutls_global_init();
Packit Service 4684c1
}
Packit Service 4684c1
Packit Service 4684c1
static void __attribute__((destructor)) deinit(void)
Packit Service 4684c1
{
Packit Service 4684c1
	gnutls_global_deinit();
Packit Service 4684c1
}