Browse Source

crypto: Alphabetise some #includes in /src/common/crypto*.

 * FIXES part of #24658: https://bugs.torproject.org/24658
Isis Lovecruft 6 years ago
parent
commit
88190026b3

+ 2 - 2
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)

+ 1 - 1
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"

+ 1 - 2
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"

+ 1 - 1
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"

+ 2 - 2
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"

+ 3 - 3
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)

+ 3 - 3
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>
 

+ 3 - 3
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				\