diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-11 13:54:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-11 13:54:47 -0400 |
commit | 922208bd2d63c282a189b6fdd0da29ff40c08e82 (patch) | |
tree | 87361f6f8df1a6d1b9a1143eca1be4c6d06ac1f4 /src/lib/crypt_ops/crypto_util.c | |
parent | 8e2df9886003c12b0624c54b950090c8fc36396b (diff) | |
download | tor-922208bd2d63c282a189b6fdd0da29ff40c08e82.tar.gz tor-922208bd2d63c282a189b6fdd0da29ff40c08e82.zip |
Extract and rename crypto_log_errors().
Diffstat (limited to 'src/lib/crypt_ops/crypto_util.c')
-rw-r--r-- | src/lib/crypt_ops/crypto_util.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/lib/crypt_ops/crypto_util.c b/src/lib/crypt_ops/crypto_util.c index 79988c6a91..a645321bfb 100644 --- a/src/lib/crypt_ops/crypto_util.c +++ b/src/lib/crypt_ops/crypto_util.c @@ -10,7 +10,6 @@ * \brief Common cryptographic utilities. **/ -#ifndef CRYPTO_UTIL_PRIVATE #define CRYPTO_UTIL_PRIVATE #include "lib/crypt_ops/crypto_util.h" @@ -105,25 +104,3 @@ memwipe(void *mem, uint8_t byte, size_t sz) **/ memset(mem, byte, sz); } - -/** Log all pending crypto errors at level <b>severity</b>. Use - * <b>doing</b> to describe our current activities. - */ -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); - } -} -#endif /* !defined(CRYPTO_UTIL_PRIVATE) */ |