summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--tests/test-arcfour.c3
-rw-r--r--tests/test-arctwo.c3
-rw-r--r--tests/test-des.c4
-rw-r--r--tests/test-gc-arcfour.c3
-rw-r--r--tests/test-gc-arctwo.c3
-rw-r--r--tests/test-gc-des.c3
-rw-r--r--tests/test-gc-hmac-md5.c3
-rw-r--r--tests/test-gc-hmac-sha1.c3
-rw-r--r--tests/test-gc-hmac-sha256.c3
-rw-r--r--tests/test-gc-hmac-sha512.c3
-rw-r--r--tests/test-gc-md2.c3
-rw-r--r--tests/test-gc-md4.c3
-rw-r--r--tests/test-gc-md5.c3
-rw-r--r--tests/test-gc-rijndael.c3
-rw-r--r--tests/test-gc-sha1.c3
-rw-r--r--tests/test-gc-sm3.c3
-rw-r--r--tests/test-gc.c3
-rw-r--r--tests/test-hmac-md5.c3
-rw-r--r--tests/test-hmac-sha1.c3
-rw-r--r--tests/test-hmac-sha256.c3
-rw-r--r--tests/test-hmac-sha512.c3
-rw-r--r--tests/test-md2.c4
-rw-r--r--tests/test-md4.c4
-rw-r--r--tests/test-md5.c4
-rw-r--r--tests/test-rijndael.c3
-rw-r--r--tests/test-sha1.c4
-rw-r--r--tests/test-sm3.c4
28 files changed, 70 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index e342dd2a34..a07ef22c3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2017-10-29 Bruno Haible <bruno@clisp.org>
+
+ crypto/*: Verify that the header file is self-contained.
+ * tests/test-gc-*.c: Include the module's header file immediately after
+ <config.h>.
+ * tests/test-hmac-*.c: Likewise.
+ * tests/test-arcfour.c: Likewise.
+ * tests/test-arctwo.c: Likewise.
+ * tests/test-des.c: Likewise.
+ * tests/test-md2.c: Likewise.
+ * tests/test-md4.c: Likewise.
+ * tests/test-md5.c: Likewise.
+ * tests/test-rijndael.c: Likewise.
+ * tests/test-sha1.c: Likewise.
+ * tests/test-sm3.c: Likewise.
+
2017-10-29 Jia Zhang <qianyue.zj@alibaba-inc.com>
Bruno Haible <bruno@clisp.org>
diff --git a/tests/test-arcfour.c b/tests/test-arcfour.c
index 75f979de40..101094aec2 100644
--- a/tests/test-arcfour.c
+++ b/tests/test-arcfour.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "arcfour.h"
+
#include <stdio.h>
#include <string.h>
-#include "arcfour.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-arctwo.c b/tests/test-arctwo.c
index d01ce3a5c4..376ec867a5 100644
--- a/tests/test-arctwo.c
+++ b/tests/test-arctwo.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "arctwo.h"
+
#include <stdio.h>
#include <string.h>
-#include "arctwo.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-des.c b/tests/test-des.c
index 4fe2958f90..666e466efe 100644
--- a/tests/test-des.c
+++ b/tests/test-des.c
@@ -19,11 +19,11 @@
#include <config.h>
+#include "des.h"
+
#include <stdio.h>
#include <string.h>
-#include "des.h"
-
int
main (int argc, char *argv[])
{
diff --git a/tests/test-gc-arcfour.c b/tests/test-gc-arcfour.c
index 75a5712bdd..0900a2de1f 100644
--- a/tests/test-gc-arcfour.c
+++ b/tests/test-gc-arcfour.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-arctwo.c b/tests/test-gc-arctwo.c
index f41d107017..9ad27e14b4 100644
--- a/tests/test-gc-arctwo.c
+++ b/tests/test-gc-arctwo.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-des.c b/tests/test-gc-des.c
index 9c49f93668..f6d302c3e8 100644
--- a/tests/test-gc-des.c
+++ b/tests/test-gc-des.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-hmac-md5.c b/tests/test-gc-hmac-md5.c
index 5b0371382d..71b0cde203 100644
--- a/tests/test-gc-hmac-md5.c
+++ b/tests/test-gc-hmac-md5.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-hmac-sha1.c b/tests/test-gc-hmac-sha1.c
index 16e0d10e5f..a4a47cc9d7 100644
--- a/tests/test-gc-hmac-sha1.c
+++ b/tests/test-gc-hmac-sha1.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-hmac-sha256.c b/tests/test-gc-hmac-sha256.c
index e61c50e52a..86d9f641ab 100644
--- a/tests/test-gc-hmac-sha256.c
+++ b/tests/test-gc-hmac-sha256.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-hmac-sha512.c b/tests/test-gc-hmac-sha512.c
index 5121233c74..97624f3942 100644
--- a/tests/test-gc-hmac-sha512.c
+++ b/tests/test-gc-hmac-sha512.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-md2.c b/tests/test-gc-md2.c
index 3dd9c3da3f..9b9f9a1ad0 100644
--- a/tests/test-gc-md2.c
+++ b/tests/test-gc-md2.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-md4.c b/tests/test-gc-md4.c
index 5830b30061..51bd8a3ccb 100644
--- a/tests/test-gc-md4.c
+++ b/tests/test-gc-md4.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-md5.c b/tests/test-gc-md5.c
index ca277afd60..66ac94bb63 100644
--- a/tests/test-gc-md5.c
+++ b/tests/test-gc-md5.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-rijndael.c b/tests/test-gc-rijndael.c
index dc60513ffb..2c1796ecb9 100644
--- a/tests/test-gc-rijndael.c
+++ b/tests/test-gc-rijndael.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-sha1.c b/tests/test-gc-sha1.c
index 75c0e02a1a..2b5b6157b4 100644
--- a/tests/test-gc-sha1.c
+++ b/tests/test-gc-sha1.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc-sm3.c b/tests/test-gc-sm3.c
index 608725d0b2..9252224f60 100644
--- a/tests/test-gc-sm3.c
+++ b/tests/test-gc-sm3.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-gc.c b/tests/test-gc.c
index e679a88596..000ba015d5 100644
--- a/tests/test-gc.c
+++ b/tests/test-gc.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "gc.h"
+
#include <stdio.h>
#include <string.h>
-#include "gc.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-hmac-md5.c b/tests/test-hmac-md5.c
index 246fcd4951..55f2c7e3ae 100644
--- a/tests/test-hmac-md5.c
+++ b/tests/test-hmac-md5.c
@@ -18,9 +18,10 @@
#include <config.h>
+#include "hmac.h"
+
#include <stdio.h>
#include <string.h>
-#include "hmac.h"
/* Test vectors from RFC 2104. */
diff --git a/tests/test-hmac-sha1.c b/tests/test-hmac-sha1.c
index 149aa333d8..a27bea7bf3 100644
--- a/tests/test-hmac-sha1.c
+++ b/tests/test-hmac-sha1.c
@@ -18,9 +18,10 @@
#include <config.h>
+#include "hmac.h"
+
#include <stdio.h>
#include <string.h>
-#include "hmac.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-hmac-sha256.c b/tests/test-hmac-sha256.c
index aeaa7cccff..c0ec4fe631 100644
--- a/tests/test-hmac-sha256.c
+++ b/tests/test-hmac-sha256.c
@@ -18,9 +18,10 @@
#include <config.h>
+#include "hmac.h"
+
#include <stdio.h>
#include <string.h>
-#include "hmac.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-hmac-sha512.c b/tests/test-hmac-sha512.c
index 88efb4c083..c09620d747 100644
--- a/tests/test-hmac-sha512.c
+++ b/tests/test-hmac-sha512.c
@@ -18,9 +18,10 @@
#include <config.h>
+#include "hmac.h"
+
#include <stdio.h>
#include <string.h>
-#include "hmac.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-md2.c b/tests/test-md2.c
index 9cdf4dbf28..e874939df8 100644
--- a/tests/test-md2.c
+++ b/tests/test-md2.c
@@ -18,11 +18,11 @@
#include <config.h>
+#include "md2.h"
+
#include <stdio.h>
#include <string.h>
-#include "md2.h"
-
int
main (int argc, char *argv[])
{
diff --git a/tests/test-md4.c b/tests/test-md4.c
index 67d1ed2992..d07872075a 100644
--- a/tests/test-md4.c
+++ b/tests/test-md4.c
@@ -19,11 +19,11 @@
#include <config.h>
+#include "md4.h"
+
#include <stdio.h>
#include <string.h>
-#include "md4.h"
-
int
main (int argc, char *argv[])
{
diff --git a/tests/test-md5.c b/tests/test-md5.c
index 19bb6a3863..9d2d697bd0 100644
--- a/tests/test-md5.c
+++ b/tests/test-md5.c
@@ -19,11 +19,11 @@
#include <config.h>
+#include "md5.h"
+
#include <stdio.h>
#include <string.h>
-#include "md5.h"
-
int
main (void)
{
diff --git a/tests/test-rijndael.c b/tests/test-rijndael.c
index 4f64927a2d..cd95533e77 100644
--- a/tests/test-rijndael.c
+++ b/tests/test-rijndael.c
@@ -17,9 +17,10 @@
#include <config.h>
+#include "rijndael-api-fst.h"
+
#include <stdio.h>
#include <string.h>
-#include "rijndael-api-fst.h"
int
main (int argc, char *argv[])
diff --git a/tests/test-sha1.c b/tests/test-sha1.c
index 6f10482f81..4e7b352a58 100644
--- a/tests/test-sha1.c
+++ b/tests/test-sha1.c
@@ -17,11 +17,11 @@
#include <config.h>
+#include "sha1.h"
+
#include <stdio.h>
#include <string.h>
-#include "sha1.h"
-
int
main (void)
{
diff --git a/tests/test-sm3.c b/tests/test-sm3.c
index 99c19452bc..179d72bc56 100644
--- a/tests/test-sm3.c
+++ b/tests/test-sm3.c
@@ -17,11 +17,11 @@
#include <config.h>
+#include "sm3.h"
+
#include <stdio.h>
#include <string.h>
-#include "sm3.h"
-
static int
test (const char *in, const char *out)
{