commit 61c7ec29f1951ddb7a8fe5109b86eb29686507b7 Author: Fernando Fernandez Mancera ffmancera@riseup.net Date: Sat Feb 3 16:16:33 2018 +0100
Include crypto_digest.h in order to solve dependency issues.
Included crypto_digest.h in some files in order to solve xof+digest module dependency issues. Removed crypto.h where it isn't needed anymore.
Follows #24658.
Signed-off-by: Fernando Fernandez Mancera ffmancera@riseup.net --- src/common/container.c | 2 +- src/common/crypto.c | 1 + src/common/crypto_curve25519.c | 1 + src/common/crypto_ed25519.c | 1 + src/common/crypto_format.c | 1 + src/common/crypto_pwbox.c | 1 + src/common/crypto_rsa.c | 1 + src/common/crypto_s2k.c | 1 + src/common/tortls.c | 2 +- src/common/tortls.h | 2 +- src/common/util.c | 2 +- src/ext/ed25519/donna/ed25519-hash-custom.h | 2 +- src/ext/ed25519/ref10/crypto_hash_sha512.h | 2 +- src/or/keypin.c | 2 +- src/or/onion_ntor.c | 1 + src/tools/tor-gencert.c | 1 + 16 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/common/container.c b/src/common/container.c index 54b0b2028..5386e6458 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -15,7 +15,7 @@ #include "util.h" #include "torlog.h" #include "container.h" -#include "crypto.h" +#include "crypto_digest.h"
#include <stdlib.h> #include <string.h> diff --git a/src/common/crypto.c b/src/common/crypto.c index edc9e9535..3f89dc706 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -29,6 +29,7 @@ #include "crypto_ed25519.h" #include "crypto_format.h" #include "crypto_rsa.h" +#include "crypto_digest.h"
DISABLE_GCC_WARNING(redundant-decls)
diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c index 8793fa627..ccf12d00f 100644 --- a/src/common/crypto_curve25519.c +++ b/src/common/crypto_curve25519.c @@ -24,6 +24,7 @@ #include "crypto.h" #include "crypto_curve25519.h" #include "crypto_format.h" +#include "crypto_digest.h" #include "util.h" #include "torlog.h"
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c index 26523e312..1175d68f4 100644 --- a/src/common/crypto_ed25519.c +++ b/src/common/crypto_ed25519.c @@ -23,6 +23,7 @@
#include "crypto.h"
+#include "crypto_digest.h" #include "crypto_curve25519.h" #include "crypto_ed25519.h" #include "crypto_format.h" diff --git a/src/common/crypto_format.c b/src/common/crypto_format.c index 1d090a877..3f6fb9f54 100644 --- a/src/common/crypto_format.c +++ b/src/common/crypto_format.c @@ -19,6 +19,7 @@ #include "crypto_curve25519.h" #include "crypto_ed25519.h" #include "crypto_format.h" +#include "crypto_digest.h" #include "util.h" #include "util_format.h" #include "torlog.h" diff --git a/src/common/crypto_pwbox.c b/src/common/crypto_pwbox.c index 12acc9331..604fc68e9 100644 --- a/src/common/crypto_pwbox.c +++ b/src/common/crypto_pwbox.c @@ -11,6 +11,7 @@ #include "crypto.h" #include "crypto_s2k.h" #include "crypto_pwbox.h" +#include "crypto_digest.h" #include "di_ops.h" #include "util.h" #include "pwbox.h" diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c index 92b5978ea..2090b2e65 100644 --- a/src/common/crypto_rsa.c +++ b/src/common/crypto_rsa.c @@ -15,6 +15,7 @@ #include "crypto_curve25519.h" #include "crypto_ed25519.h" #include "crypto_format.h" +#include "crypto_digest.h"
DISABLE_GCC_WARNING(redundant-decls)
diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c index b2fcca54c..316445e40 100644 --- a/src/common/crypto_s2k.c +++ b/src/common/crypto_s2k.c @@ -16,6 +16,7 @@ #include "util.h" #include "compat.h" #include "crypto_s2k.h" +#include "crypto_digest.h"
#include <openssl/evp.h>
diff --git a/src/common/tortls.c b/src/common/tortls.c index 86a876780..777bdda16 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -25,6 +25,7 @@ #include <ws2tcpip.h> #endif
+#include "crypto.h" #include "compat.h"
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in @@ -32,7 +33,6 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/opensslv.h> -#include "crypto.h"
#ifdef OPENSSL_NO_EC #error "We require OpenSSL with ECC support" diff --git a/src/common/tortls.h b/src/common/tortls.h index 1dbf0b332..161b8e73a 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -11,7 +11,7 @@ * \brief Headers for tortls.c **/
-#include "crypto.h" +#include "crypto_digest.h" #include "compat_openssl.h" #include "compat.h" #include "testsupport.h" diff --git a/src/common/util.c b/src/common/util.c index 67e97811c..36b413dc8 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -16,7 +16,7 @@ #define UTIL_PRIVATE #include "util.h" #include "torlog.h" -#include "crypto.h" +#include "crypto_digest.h" #include "torint.h" #include "container.h" #include "address.h" diff --git a/src/ext/ed25519/donna/ed25519-hash-custom.h b/src/ext/ed25519/donna/ed25519-hash-custom.h index 609451abd..cdeab3e45 100644 --- a/src/ext/ed25519/donna/ed25519-hash-custom.h +++ b/src/ext/ed25519/donna/ed25519-hash-custom.h @@ -9,7 +9,7 @@ void ed25519_hash(uint8_t *hash, const uint8_t *in, size_t inlen); */
-#include "crypto.h" +#include "crypto_digest.h"
typedef struct ed25519_hash_context { crypto_digest_t *ctx; diff --git a/src/ext/ed25519/ref10/crypto_hash_sha512.h b/src/ext/ed25519/ref10/crypto_hash_sha512.h index 5dad935c7..7faddb159 100644 --- a/src/ext/ed25519/ref10/crypto_hash_sha512.h +++ b/src/ext/ed25519/ref10/crypto_hash_sha512.h @@ -1,5 +1,5 @@ /* Added for Tor. */ -#include "crypto.h" +#include "crypto_digest.h"
/* Set 'out' to the 512-bit SHA512 hash of the 'len'-byte string in 'inp' */ #define crypto_hash_sha512(out, inp, len) \ diff --git a/src/or/keypin.c b/src/or/keypin.c index 1698dc184..457f21696 100644 --- a/src/or/keypin.c +++ b/src/or/keypin.c @@ -12,7 +12,7 @@
#include "orconfig.h" #include "compat.h" -#include "crypto.h" +#include "crypto_digest.h" #include "crypto_format.h" #include "di_ops.h" #include "ht.h" diff --git a/src/or/onion_ntor.c b/src/or/onion_ntor.c index b167cb61f..8ad876a58 100644 --- a/src/or/onion_ntor.c +++ b/src/or/onion_ntor.c @@ -22,6 +22,7 @@
#define ONION_NTOR_PRIVATE #include "crypto.h" +#include "crypto_digest.h" #include "onion_ntor.h" #include "torlog.h" #include "util.h" diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index fb7465c0e..0d329b518 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -40,6 +40,7 @@ ENABLE_GCC_WARNING(redundant-decls) #include "util.h" #include "torlog.h" #include "crypto.h" +#include "crypto_digest.h" #include "address.h" #include "util_format.h"
tor-commits@lists.torproject.org