summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <ffmancera@riseup.net>2018-01-22 16:48:33 +0100
committerFernando Fernandez Mancera <ffmancera@riseup.net>2018-01-22 16:48:33 +0100
commitf2fca519762cdd37c8559eb95bb8b41973225d38 (patch)
treeef672d8fdea336ecfbf45bf07dbe35e51fa5cb3c
parent5cd74b4884d35b43e464a3dcc6125f7ca2a3b0e3 (diff)
downloadtor-f2fca519762cdd37c8559eb95bb8b41973225d38.tar.gz
tor-f2fca519762cdd37c8559eb95bb8b41973225d38.zip
Move the openssl namespace back into .c files.
As we're trying not to have all the other modules in Tor, we moved the openssl namespace includes back into crypto.c and crypto_openssl_mgt.c files. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
-rw-r--r--src/common/crypto.c15
-rw-r--r--src/common/crypto_openssl_mgt.c15
-rw-r--r--src/common/crypto_openssl_mgt.h15
3 files changed, 30 insertions, 15 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 96a1f7c007..3fba2da5d9 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -29,6 +29,21 @@
#include "crypto_ed25519.h"
#include "crypto_format.h"
+DISABLE_GCC_WARNING(redundant-decls)
+
+#include <openssl/err.h>
+#include <openssl/rsa.h>
+#include <openssl/pem.h>
+#include <openssl/evp.h>
+#include <openssl/engine.h>
+#include <openssl/rand.h>
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+#include <openssl/conf.h>
+#include <openssl/hmac.h>
+
+ENABLE_GCC_WARNING(redundant-decls)
+
#if __GNUC__ && GCC_VERSION >= 402
#if GCC_VERSION >= 406
#pragma GCC diagnostic pop
diff --git a/src/common/crypto_openssl_mgt.c b/src/common/crypto_openssl_mgt.c
index c19da5b9f4..ca91e12d1e 100644
--- a/src/common/crypto_openssl_mgt.c
+++ b/src/common/crypto_openssl_mgt.c
@@ -12,6 +12,21 @@
#include "crypto_openssl_mgt.h"
+DISABLE_GCC_WARNING(redundant-decls)
+
+#include <openssl/err.h>
+#include <openssl/rsa.h>
+#include <openssl/pem.h>
+#include <openssl/evp.h>
+#include <openssl/engine.h>
+#include <openssl/rand.h>
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+#include <openssl/conf.h>
+#include <openssl/hmac.h>
+
+ENABLE_GCC_WARNING(redundant-decls)
+
#ifndef NEW_THREAD_API
/** A number of preallocated mutexes for use by OpenSSL. */
static tor_mutex_t **openssl_mutexes_ = NULL;
diff --git a/src/common/crypto_openssl_mgt.h b/src/common/crypto_openssl_mgt.h
index 9b887abd5d..09b6737962 100644
--- a/src/common/crypto_openssl_mgt.h
+++ b/src/common/crypto_openssl_mgt.h
@@ -18,21 +18,6 @@
#include <openssl/engine.h>
-DISABLE_GCC_WARNING(redundant-decls)
-
-#include <openssl/err.h>
-#include <openssl/rsa.h>
-#include <openssl/pem.h>
-#include <openssl/evp.h>
-#include <openssl/engine.h>
-#include <openssl/rand.h>
-#include <openssl/bn.h>
-#include <openssl/dh.h>
-#include <openssl/conf.h>
-#include <openssl/hmac.h>
-
-ENABLE_GCC_WARNING(redundant-decls)
-
/*
Macro to create an arbitrary OpenSSL version number as used by
OPENSSL_VERSION_NUMBER or SSLeay(), since the actual numbers are a bit hard