diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2018-05-08 15:40:11 +0200 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2018-05-08 15:40:11 +0200 |
commit | 5b7a12d58a9e58d35c0007062377ea308faf1989 (patch) | |
tree | c2b5fb7050ec2fc803998aecc45aad647c65e166 /src/common/crypto.c | |
parent | 5ad72bc1f50253c7d080e5d1f8f254f01bb1f19b (diff) | |
download | tor-5b7a12d58a9e58d35c0007062377ea308faf1989.tar.gz tor-5b7a12d58a9e58d35c0007062377ea308faf1989.zip |
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 <ffmancera@riseup.net>
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 052f31723b..6518ea9cc6 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -86,27 +86,6 @@ static int crypto_early_initialized_ = 0; /** Boolean: has OpenSSL's crypto been initialized? */ static int crypto_global_initialized_ = 0; -/** Log all pending crypto errors at level <b>severity</b>. Use - * <b>doing</b> to describe our current activities. - */ -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 (BUG(!doing)) doing = "(null)"; - tor_log(severity, LD_CRYPTO, "crypto error while %s: %s (in %s:%s)", - doing, msg, lib, func); - } -} - #ifndef DISABLE_ENGINES /** Log any OpenSSL engines we're using at NOTICE. */ static void |