commit 88190026b3286b32ac22c1bbd999b7f1de2aa79f Author: Isis Lovecruft isis@torproject.org Date: Fri Apr 6 21:40:17 2018 +0000
crypto: Alphabetise some #includes in /src/common/crypto*.
* FIXES part of #24658: https://bugs.torproject.org/24658 --- src/common/crypto.c | 4 ++-- src/common/crypto_curve25519.c | 2 +- src/common/crypto_ed25519.c | 3 +-- src/common/crypto_format.c | 2 +- src/common/crypto_pwbox.c | 4 ++-- src/common/crypto_rsa.c | 6 +++--- src/common/crypto_s2k.c | 6 +++--- src/common/include.am | 6 +++--- 8 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/src/common/crypto.c b/src/common/crypto.c index 9c40243f8..ae7b519f9 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -23,14 +23,14 @@ #endif /* defined(_WIN32) */
#define CRYPTO_PRIVATE -#include "crypto.h" #include "compat_openssl.h" +#include "crypto.h" #include "crypto_curve25519.h" +#include "crypto_digest.h" #include "crypto_ed25519.h" #include "crypto_format.h" #include "crypto_rand.h" #include "crypto_rsa.h" -#include "crypto_digest.h" #include "crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls) diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c index 0719c2f85..becd70669 100644 --- a/src/common/crypto_curve25519.c +++ b/src/common/crypto_curve25519.c @@ -23,8 +23,8 @@ #include "container.h" #include "crypto.h" #include "crypto_curve25519.h" -#include "crypto_format.h" #include "crypto_digest.h" +#include "crypto_format.h" #include "crypto_rand.h" #include "crypto_util.h" #include "util.h" diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c index baddb77dd..25e0cd034 100644 --- a/src/common/crypto_ed25519.c +++ b/src/common/crypto_ed25519.c @@ -22,9 +22,8 @@ #endif
#include "crypto.h" - -#include "crypto_digest.h" #include "crypto_curve25519.h" +#include "crypto_digest.h" #include "crypto_ed25519.h" #include "crypto_format.h" #include "crypto_rand.h" diff --git a/src/common/crypto_format.c b/src/common/crypto_format.c index c0cade2f5..a76203207 100644 --- a/src/common/crypto_format.c +++ b/src/common/crypto_format.c @@ -17,9 +17,9 @@ #include "container.h" #include "crypto.h" #include "crypto_curve25519.h" +#include "crypto_digest.h" #include "crypto_ed25519.h" #include "crypto_format.h" -#include "crypto_digest.h" #include "crypto_util.h" #include "util.h" #include "util_format.h" diff --git a/src/common/crypto_pwbox.c b/src/common/crypto_pwbox.c index e49ca226e..c2bd1d26c 100644 --- a/src/common/crypto_pwbox.c +++ b/src/common/crypto_pwbox.c @@ -9,10 +9,10 @@ */
#include "crypto.h" -#include "crypto_s2k.h" -#include "crypto_pwbox.h" #include "crypto_digest.h" +#include "crypto_pwbox.h" #include "crypto_rand.h" +#include "crypto_s2k.h" #include "crypto_util.h" #include "di_ops.h" #include "util.h" diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c index 0e006b0eb..0a88b0e77 100644 --- a/src/common/crypto_rsa.c +++ b/src/common/crypto_rsa.c @@ -9,13 +9,13 @@ * \brief Block of functions related with RSA utilities and operations. **/
-#include "crypto_rsa.h" #include "crypto.h" -#include "compat_openssl.h" #include "crypto_curve25519.h" -#include "crypto_format.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"
DISABLE_GCC_WARNING(redundant-decls) diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c index 7d7f475b6..8543760ec 100644 --- a/src/common/crypto_s2k.c +++ b/src/common/crypto_s2k.c @@ -12,13 +12,13 @@
#define CRYPTO_S2K_PRIVATE
-#include "crypto.h" -#include "util.h" #include "compat.h" -#include "crypto_s2k.h" +#include "crypto.h" #include "crypto_digest.h" #include "crypto_rand.h" +#include "crypto_s2k.h" #include "crypto_util.h" +#include "util.h"
#include <openssl/evp.h>
diff --git a/src/common/include.am b/src/common/include.am index f0cbd0e1d..81ae8fc27 100644 --- a/src/common/include.am +++ b/src/common/include.am @@ -115,12 +115,12 @@ LIBOR_CRYPTO_A_SRC = \ src/common/compress_zstd.c \ src/common/crypto.c \ src/common/crypto_digest.c \ - src/common/crypto_rsa.c \ + src/common/crypto_format.c \ src/common/crypto_openssl_mgt.c \ src/common/crypto_pwbox.c \ src/common/crypto_rand.c \ + src/common/crypto_rsa.c \ src/common/crypto_s2k.c \ - src/common/crypto_format.c \ src/common/crypto_util.c \ src/common/tortls.c \ src/common/crypto_curve25519.c \ @@ -173,9 +173,9 @@ COMMONHEADERS = \ src/common/crypto_ed25519.h \ src/common/crypto_format.h \ src/common/crypto_openssl_mgt.h \ - src/common/crypto_rsa.h \ src/common/crypto_pwbox.h \ src/common/crypto_rand.h \ + src/common/crypto_rsa.h \ src/common/crypto_s2k.h \ src/common/crypto_util.h \ src/common/di_ops.h \