From 5b7a12d58a9e58d35c0007062377ea308faf1989 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 8 May 2018 15:40:11 +0200 Subject: Add crypto_log_errors() to crypto_util.[ch] crypto_log_errors() has been moved to crypto_util.[ch]. It was duplicated in some files so they have been removed too. Follows #24658. Signed-off-by: Fernando Fernandez Mancera --- src/tools/tor-gencert.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/tools') diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index aafefdad74..ff3ce517e8 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -78,29 +78,6 @@ show_help(void) "[--passphrase-fd ]\n"); } -/* XXXX copied from crypto.c */ -static void -crypto_log_errors(int severity, const char *doing) -{ - unsigned long err; - const char *msg, *lib, *func; - while ((err = ERR_get_error()) != 0) { - msg = (const char*)ERR_reason_error_string(err); - lib = (const char*)ERR_lib_error_string(err); - func = (const char*)ERR_func_error_string(err); - if (!msg) msg = "(null)"; - if (!lib) lib = "(null)"; - if (!func) func = "(null)"; - if (doing) { - tor_log(severity, LD_CRYPTO, "crypto error while %s: %s (in %s:%s)", - doing, msg, lib, func); - } else { - tor_log(severity, LD_CRYPTO, "crypto error: %s (in %s:%s)", - msg, lib, func); - } - } -} - /** Read the passphrase from the passphrase fd. */ static int load_passphrase(void) -- cgit v1.2.3-54-g00ecf