links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 6c266c334de42b74842c1f709d0fbbfea1a387e7
Parent: c52aacd0928558978c1df39e2b619d44642e44d6
Author: opask
Date:   Sat, 25 Aug 2018 19:59:24 -0600

remove unused variables in https.c

Diffstat:
Mhttps.c | 11-----------
Mmenu.c | 2--
2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/https.c b/https.c @@ -21,9 +21,7 @@ #include "links.h" -static int ssl_initialized = 0; static SSL_CTX *contexts = NULL; -int ssl_asked_for_password; struct session_cache_entry { list_entry_1st @@ -39,7 +37,6 @@ static struct list_head session_cache = { &session_cache, &session_cache }; static int ssl_password_callback(char *buf, int size, int rwflag, void *userdata) { - ssl_asked_for_password = 1; if (size > strlen((char *)ssl_options.client_cert_password)) size = strlen((char *)ssl_options.client_cert_password); memcpy(buf, ssl_options.client_cert_password, size); @@ -49,10 +46,6 @@ static int ssl_password_callback(char *buf, int size, int rwflag, void *userdata links_ssl *getSSL(void) { links_ssl *ssl; - if (!ssl_initialized) { - contexts = NULL; - ssl_initialized = 1; - } if (!contexts) { SSL_CTX *ctx; @@ -101,10 +94,6 @@ void ssl_finish(void) { SSL_CTX_free(contexts); contexts = NULL; - if (ssl_initialized) { - clear_ssl_errors(__LINE__); - ssl_initialized = 0; - } } void https_func(struct connection *c) diff --git a/menu.c b/menu.c @@ -1333,9 +1333,7 @@ static int check_file(struct dialog_data *dlg, struct dialog_item_data *di, int return 0; #if !defined(OPENSSL_NO_STDIO) if (!type) { - ssl_asked_for_password = 0; r = SSL_use_PrivateKey_file(ssl->ssl, cast_const_char p, SSL_FILETYPE_PEM); - if (!r && ssl_asked_for_password) r = 1; r = r != 1; } else { r = SSL_use_certificate_file(ssl->ssl, cast_const_char p, SSL_FILETYPE_PEM);