mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
tests: Cleanup OpenSSL in tests when GSSAPI is built
also from the fuzzer tests Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
62762bbbc9
commit
08a32ac381
@ -1,8 +1,14 @@
|
||||
/* Simpler gnu89 version of StandaloneFuzzTargetMain.c from LLVM */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(WITH_GSSAPI)
|
||||
/* for OPENSSL_cleanup() of GSSAPI's OpenSSL context */
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
|
||||
int LLVMFuzzerTestOneInput (const unsigned char *data, size_t size);
|
||||
__attribute__((weak)) int LLVMFuzzerInitialize(int *argc, char ***argv);
|
||||
@ -35,5 +41,9 @@ main (int argc, char **argv)
|
||||
|
||||
free (buf);
|
||||
printf ("Done!\n");
|
||||
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(WITH_GSSAPI)
|
||||
OPENSSL_cleanup();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user