summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-04-28 12:22:59 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-07 21:10:46 +0200
commitfeab28d68df8aadda62b7964c23537d32a52ee54 (patch)
treeacb4308de87c0aaf9c33776dd755945b78bf21b5
parent3cfc33248efc2414e7ee25260da02bb6fe9c20ea (diff)
downloadgnutls-feab28d68df8aadda62b7964c23537d32a52ee54.tar.gz
Add or clean header guards in tests/
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
-rw-r--r--tests/cert-common.h5
-rw-r--r--tests/cert-repro-20170915.h5
-rw-r--r--tests/cmocka-common.h5
-rw-r--r--tests/common-cert-key-exchange.h5
-rw-r--r--tests/common-key-tests.h5
-rw-r--r--tests/eagain-common.h5
-rw-r--r--tests/hex.h6
-rw-r--r--tests/ocsp-common.h6
-rw-r--r--tests/test-chains.h5
-rw-r--r--tests/utils.h6
-rw-r--r--tests/virt-time.h6
-rw-r--r--tests/x509sign-verify-common.h5
12 files changed, 52 insertions, 12 deletions
diff --git a/tests/cert-common.h b/tests/cert-common.h
index 86aeb5c924..5ccae43ccc 100644
--- a/tests/cert-common.h
+++ b/tests/cert-common.h
@@ -20,6 +20,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef GNUTLS_TESTS_CERT_COMMON_H
+#define GNUTLS_TESTS_CERT_COMMON_H
+
#include <gnutls/gnutls.h>
/* This file contains a lot of common parameters used by legacy and new
@@ -1911,3 +1914,5 @@ const gnutls_datum_t rawpk_private_key2 = {
(unsigned char*)rawpk_private_key_pem2,
sizeof(rawpk_private_key_pem2) - 1
};
+
+#endif /* GNUTLS_TESTS_CERT_COMMON_H */
diff --git a/tests/cert-repro-20170915.h b/tests/cert-repro-20170915.h
index 7381497c06..9078857a0a 100644
--- a/tests/cert-repro-20170915.h
+++ b/tests/cert-repro-20170915.h
@@ -1,3 +1,6 @@
+#ifndef GNUTLS_TESTS_CERT_REPRO_20170915_H
+#define GNUTLS_TESTS_CERT_REPRO_20170915_H
+
static char client_cert_repro_pem[] =
"-----BEGIN CERTIFICATE-----\n"
"MIILITCCBiegAwIBAgIJAMHDrh3rcjmCMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n"
@@ -376,3 +379,5 @@ static gnutls_datum_t server_repro_key = { (void*)server_key_repro_pem, sizeof(s
static gnutls_datum_t server_repro_cert = { (void*)server_cert_repro_pem, sizeof(server_cert_repro_pem)-1 };
static gnutls_datum_t client_repro_key = { (void*)client_key_repro_pem, sizeof(client_key_repro_pem)-1 };
static gnutls_datum_t client_repro_cert = { (void*)client_cert_repro_pem, sizeof(client_cert_repro_pem)-1 };
+
+#endif /* GNUTLS_TESTS_CERT_REPRO_20170915_H */
diff --git a/tests/cmocka-common.h b/tests/cmocka-common.h
index 2ac0dfbf9c..3f0c9316c6 100644
--- a/tests/cmocka-common.h
+++ b/tests/cmocka-common.h
@@ -1,3 +1,6 @@
+#ifndef GNUTLS_TESTS_CMOCKA_COMMON_H
+#define GNUTLS_TESTS_CMOCKA_COMMON_H
+
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
@@ -5,3 +8,5 @@
#define USE_CMOCKA
#include "eagain-common.h"
+
+#endif /* GNUTLS_TESTS_CMOCKA_COMMON_H */
diff --git a/tests/common-cert-key-exchange.h b/tests/common-cert-key-exchange.h
index 5d68d72ff8..57b2b54239 100644
--- a/tests/common-cert-key-exchange.h
+++ b/tests/common-cert-key-exchange.h
@@ -20,6 +20,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef GNUTLS_TESTS_COMMON_CERT_KEY_EXCHANGE_H
+#define GNUTLS_TESTS_COMMON_CERT_KEY_EXCHANGE_H
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -114,3 +117,5 @@ void dtls_try_with_key_mtu(const char *name, const char *client_prio, gnutls_kx_
const gnutls_datum_t *cli_cert,
const gnutls_datum_t *cli_key,
unsigned client_cert, unsigned mtu);
+
+#endif /* GNUTLS_TESTS_COMMON_CERT_KEY_EXCHANGE_H */
diff --git a/tests/common-key-tests.h b/tests/common-key-tests.h
index 2c60176e6f..f3490409e8 100644
--- a/tests/common-key-tests.h
+++ b/tests/common-key-tests.h
@@ -20,6 +20,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef GNUTLS_TESTS_COMMON_KEY_TESTS_H
+#define GNUTLS_TESTS_COMMON_KEY_TESTS_H
+
#include "cert-common.h"
#include <gnutls/abstract.h>
@@ -88,3 +91,5 @@ struct _key_tests_st common_key_tests[] = {
.data_only = 1
}
};
+
+#endif /* GNUTLS_TESTS_COMMON_KEY_TESTS_H */
diff --git a/tests/eagain-common.h b/tests/eagain-common.h
index 19084050b7..6b168cb684 100644
--- a/tests/eagain-common.h
+++ b/tests/eagain-common.h
@@ -1,3 +1,6 @@
+#ifndef GNUTLS_TESTS_EAGAIN_COMMON_H
+#define GNUTLS_TESTS_EAGAIN_COMMON_H
+
#include <errno.h>
#include <time.h>
#include <stdio.h>
@@ -361,3 +364,5 @@ inline static int record_send_loop(gnutls_session_t session,
return ret;
}
+
+#endif /* GNUTLS_TESTS_EAGAIN_COMMON_H */
diff --git a/tests/hex.h b/tests/hex.h
index 616d92489a..4129a0537e 100644
--- a/tests/hex.h
+++ b/tests/hex.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
-#ifndef HEX_H
-#define HEX_H
+#ifndef GNUTLS_TESTS_HEX_H
+#define GNUTLS_TESTS_HEX_H
#include <stdio.h>
#include <string.h>
@@ -47,4 +47,4 @@ inline static gnutls_datum_t SDATA(const char *txt)
return output;
}
-#endif
+#endif /* GNUTLS_TESTS_HEX_H */
diff --git a/tests/ocsp-common.h b/tests/ocsp-common.h
index a1bee46173..30bcbbf843 100644
--- a/tests/ocsp-common.h
+++ b/tests/ocsp-common.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef OCSP_COMMON_H
-#define OCSP_COMMON_H
+#ifndef GNUTLS_TESTS_OCSP_COMMON_H
+#define GNUTLS_TESTS_OCSP_COMMON_H
#if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# pragma GCC diagnostic push
@@ -584,4 +584,4 @@ static gnutls_datum_t ocsp_subca3_unknown_pem = {
# pragma GCC diagnostic pop
#endif
-#endif
+#endif /* GNUTLS_TESTS_OCSP_COMMON_H */
diff --git a/tests/test-chains.h b/tests/test-chains.h
index 3ca098d4ba..cf4d0c442a 100644
--- a/tests/test-chains.h
+++ b/tests/test-chains.h
@@ -20,6 +20,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
+#ifndef GNUTLS_TESTS_TEST_CHAINS_H
+#define GNUTLS_TESTS_TEST_CHAINS_H
+
/* *INDENT-OFF* */
#define MAX_CHAIN 10
@@ -4150,3 +4153,5 @@ static struct
#endif
/* *INDENT-ON* */
+
+#endif /* GNUTLS_TESTS_TEST_CHAINS_H */
diff --git a/tests/utils.h b/tests/utils.h
index dda3ef47ad..e36e4f3b6b 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
-#ifndef UTILS_H
-#define UTILS_H
+#ifndef GNUTLS_TESTS_UTILS_H
+#define GNUTLS_TESTS_UTILS_H
#include <stdio.h>
#include <stdlib.h>
@@ -174,4 +174,4 @@ inline static void check_wait_status_for_sig(int status)
_check_wait_status(status, 1);
}
-#endif /* UTILS_H */
+#endif /* GNUTLS_TESTS_UTILS_H */
diff --git a/tests/virt-time.h b/tests/virt-time.h
index 3bf6d4d2d7..0e7e213c53 100644
--- a/tests/virt-time.h
+++ b/tests/virt-time.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
-#ifndef VIRT_TIME_H
-#define VIRT_TIME_H
+#ifndef GNUTLS_TESTS_VIRT_TIME_H
+#define GNUTLS_TESTS_VIRT_TIME_H
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -68,4 +68,4 @@ static void mygettime(struct timespec * t)
*t = _now_ts;
}
-#endif
+#endif /* GNUTLS_TESTS_VIRT_TIME_H */
diff --git a/tests/x509sign-verify-common.h b/tests/x509sign-verify-common.h
index d7f3b41cfa..80aea5cd63 100644
--- a/tests/x509sign-verify-common.h
+++ b/tests/x509sign-verify-common.h
@@ -1,3 +1,6 @@
+#ifndef GNUTLS_TESTS_X509SIGN_VERIFY_COMMON_H
+#define GNUTLS_TESTS_X509SIGN_VERIFY_COMMON_H
+
static void tls_log_func(int level, const char *str)
{
fprintf(stderr, "<%d> %s", level, str);
@@ -223,3 +226,5 @@ void test_sig(gnutls_pk_algorithm_t pk, unsigned hash, unsigned bits)
gnutls_pubkey_deinit(pubkey);
}
}
+
+#endif /* GNUTLS_TESTS_X509SIGN_VERIFY_COMMON_H */