diff options
| author | Tim Rühsen <tim.ruehsen@gmx.de> | 2021-05-02 19:42:56 +0200 |
|---|---|---|
| committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2021-05-02 19:43:06 +0200 |
| commit | 5fe8d26904880ab59b2343f31ff7399edbbc43f1 (patch) | |
| tree | 7ebbc09e7d3d84f63ea109b702344e9fc093180f /src/gnutls.c | |
| parent | aabdf6eb668cfc485bdfcad3482a3a9be4a99416 (diff) | |
| download | wget-5fe8d26904880ab59b2343f31ff7399edbbc43f1.tar.gz | |
Improve wget_options_fuzzer
* fuzz/fuzzer.h: Ignore -Wunused-parameter.
* fuzz/wget_options_fuzzer.c: Let getaddrinfo() fail in while fuzzing.
* fuzz/wget_options_fuzzer.in/*: Update corpora from OSS-Fuzz.
Diffstat (limited to 'src/gnutls.c')
| -rw-r--r-- | src/gnutls.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index d8e2530..0ecf2c8 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -93,12 +93,14 @@ key_type_to_gnutls_type (enum keyfile_type type) confused with actual gnutls functions -- such as the gnutls_read preprocessor macro. */ +static bool ssl_initialized = false; + static gnutls_certificate_credentials_t credentials; bool ssl_init (void) { + fprintf(stderr,"SSL_INIT\n"); /* Becomes true if GnuTLS is initialized. */ - static bool ssl_initialized = false; const char *ca_directory; DIR *dir; int ncerts = -1; @@ -235,10 +237,17 @@ cert to be of the same type.\n")); void ssl_cleanup (void) { + fprintf(stderr,"SSL_CLEANUP\n"); + + if (!ssl_initialized) + return; + if (credentials) gnutls_certificate_free_credentials(credentials); gnutls_global_deinit(); + + ssl_initialized = false; } struct wgnutls_transport_context |
