diff options
Diffstat (limited to 'src/common/crypto_rsa.c')
-rw-r--r-- | src/common/crypto_rsa.c | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c index f66cdef3c5..3128983435 100644 --- a/src/common/crypto_rsa.c +++ b/src/common/crypto_rsa.c @@ -1,7 +1,7 @@ /* Copyright (c) 2001, Matej Pfajfar. * Copyright (c) 2001-2004, Roger Dingledine. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. - * Copyright (c) 2007-2017, The Tor Project, Inc. */ + * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** @@ -9,14 +9,14 @@ * \brief Block of functions related with RSA utilities and operations. **/ -#include "crypto.h" -#include "crypto_curve25519.h" -#include "crypto_digest.h" -#include "crypto_format.h" -#include "compat_openssl.h" -#include "crypto_rand.h" -#include "crypto_rsa.h" -#include "crypto_util.h" +#include "common/crypto.h" +#include "common/crypto_curve25519.h" +#include "common/crypto_digest.h" +#include "common/crypto_format.h" +#include "common/compat_openssl.h" +#include "common/crypto_rand.h" +#include "common/crypto_rsa.h" +#include "common/crypto_util.h" DISABLE_GCC_WARNING(redundant-decls) @@ -33,9 +33,9 @@ DISABLE_GCC_WARNING(redundant-decls) ENABLE_GCC_WARNING(redundant-decls) -#include "torlog.h" -#include "util.h" -#include "util_format.h" +#include "common/torlog.h" +#include "common/util.h" +#include "common/util_format.h" /** Declaration for crypto_pk_t structure. */ struct crypto_pk_t @@ -44,27 +44,6 @@ struct crypto_pk_t RSA *key; /**< The key itself */ }; -/** 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); - } -} - /** Return the number of bytes added by padding method <b>padding</b>. */ int |