diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-05-08 22:05:10 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-05-08 22:05:10 +0200 |
commit | 3c74d27ddcde16062992bac93ddcf0e270adb144 (patch) | |
tree | d47f4ef9da08772752488cb86e51a52b642d66fe | |
parent | 664fc06c44301eb811a28b444f35dd8e3c688dea (diff) | |
download | gnutls-3c74d27ddcde16062992bac93ddcf0e270adb144.tar.gz |
accelerated: added header guards
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r-- | lib/accelerated/aarch64/aarch64-common.h | 5 | ||||
-rw-r--r-- | lib/accelerated/aarch64/aes-aarch64.h | 6 | ||||
-rw-r--r-- | lib/accelerated/aarch64/sha-aarch64.h | 6 | ||||
-rw-r--r-- | lib/accelerated/accelerated.h | 5 | ||||
-rw-r--r-- | lib/accelerated/cryptodev.h | 5 | ||||
-rw-r--r-- | lib/accelerated/x86/aes-gcm-aead.h | 4 | ||||
-rw-r--r-- | lib/accelerated/x86/aes-padlock.h | 6 | ||||
-rw-r--r-- | lib/accelerated/x86/aes-x86.h | 6 | ||||
-rw-r--r-- | lib/accelerated/x86/sha-padlock.h | 6 | ||||
-rw-r--r-- | lib/accelerated/x86/sha-x86.h | 6 | ||||
-rw-r--r-- | lib/accelerated/x86/x86-common.h | 4 |
11 files changed, 41 insertions, 18 deletions
diff --git a/lib/accelerated/aarch64/aarch64-common.h b/lib/accelerated/aarch64/aarch64-common.h index ed2b4e8baf..039b8fb0d8 100644 --- a/lib/accelerated/aarch64/aarch64-common.h +++ b/lib/accelerated/aarch64/aarch64-common.h @@ -20,6 +20,9 @@ * */ +#ifndef GNUTLS_LIB_ACCELERATED_AARCH64_AARCH64_COMMON_H +# define GNUTLS_LIB_ACCELERATED_AARCH64_AARCH64_COMMON_H + #if !__ASSEMBLER__ #define NN_HASH(name, update_func, digest_func, NAME) { \ #name, \ @@ -41,3 +44,5 @@ void register_aarch64_crypto(void); #define ARMV8_SHA256 (1<<4) #define ARMV8_PMULL (1<<5) #define ARMV8_SHA512 (1<<6) + +#endif /* GNUTLS_LIB_ACCELERATED_AARCH64_AARCH64_COMMON_H */ diff --git a/lib/accelerated/aarch64/aes-aarch64.h b/lib/accelerated/aarch64/aes-aarch64.h index f596f4aac6..692d8620d7 100644 --- a/lib/accelerated/aarch64/aes-aarch64.h +++ b/lib/accelerated/aarch64/aes-aarch64.h @@ -1,5 +1,5 @@ -#ifndef AES_ARM_H -#define AES_ARM_H +#ifndef GNUTLS_LIB_ACCELERATED_AARCH64_AES_AARCH64_H +#define GNUTLS_LIB_ACCELERATED_AARCH64_AES_AARCH64_H #include "gnutls_int.h" @@ -31,4 +31,4 @@ extern const gnutls_crypto_cipher_st _gnutls_aes_gcm_aarch64; extern const gnutls_crypto_cipher_st _gnutls_aes_cbc_aarch64; extern const gnutls_crypto_cipher_st _gnutls_aes_ccm_aarch64; -#endif +#endif /* GNUTLS_LIB_ACCELERATED_AARCH64_AES_AARCH64_H */ diff --git a/lib/accelerated/aarch64/sha-aarch64.h b/lib/accelerated/aarch64/sha-aarch64.h index 010a216232..e5282b87a1 100644 --- a/lib/accelerated/aarch64/sha-aarch64.h +++ b/lib/accelerated/aarch64/sha-aarch64.h @@ -1,5 +1,5 @@ -#ifndef SHA_ARM_H -#define SHA_ARM_H +#ifndef GNUTLS_LIB_ACCELERATED_AARCH64_SHA_AARCH64_H +#define GNUTLS_LIB_ACCELERATED_AARCH64_SHA_AARCH64_H #include <nettle/sha.h> @@ -16,4 +16,4 @@ void aarch64_sha1_update(struct sha1_ctx *ctx, size_t length, const uint8_t * da void aarch64_sha256_update(struct sha256_ctx *ctx, size_t length, const uint8_t * data); void aarch64_sha512_update(struct sha512_ctx *ctx, size_t length, const uint8_t * data); -#endif +#endif /* GNUTLS_LIB_ACCELERATED_AARCH64_SHA_AARCH64_H */ diff --git a/lib/accelerated/accelerated.h b/lib/accelerated/accelerated.h index 1fccccbb3c..5e9e92afb1 100644 --- a/lib/accelerated/accelerated.h +++ b/lib/accelerated/accelerated.h @@ -1 +1,6 @@ +#ifndef GNUTLS_LIB_ACCELERATED_ACCELERATED_H +# define GNUTLS_LIB_ACCELERATED_ACCELERATED_H + void _gnutls_register_accel_crypto(void); + +#endif /* GNUTLS_LIB_ACCELERATED_ACCELERATED_H */ diff --git a/lib/accelerated/cryptodev.h b/lib/accelerated/cryptodev.h index 78b81cbd53..4824def777 100644 --- a/lib/accelerated/cryptodev.h +++ b/lib/accelerated/cryptodev.h @@ -1,3 +1,6 @@ +#ifndef GNUTLS_LIB_ACCELERATED_CRYPTODEV_H +# define GNUTLS_LIB_ACCELERATED_CRYPTODEV_H + extern int _gnutls_cryptodev_fd; #define CHECK_AES_KEYSIZE(s) \ @@ -7,3 +10,5 @@ extern int _gnutls_cryptodev_fd; void _gnutls_cryptodev_deinit(void); int _gnutls_cryptodev_init(void); int _cryptodev_register_gcm_crypto(int cfd); + +#endif /* GNUTLS_LIB_ACCELERATED_CRYPTODEV_H */ diff --git a/lib/accelerated/x86/aes-gcm-aead.h b/lib/accelerated/x86/aes-gcm-aead.h index a1a71edbc5..f8cb5a5ea1 100644 --- a/lib/accelerated/x86/aes-gcm-aead.h +++ b/lib/accelerated/x86/aes-gcm-aead.h @@ -1,3 +1,6 @@ +#ifndef GNUTLS_LIB_ACCELERATED_X86_AES_GCM_AEAD_H +# define GNUTLS_LIB_ACCELERATED_X86_AES_GCM_AEAD_H + static int aes_gcm_aead_encrypt(void *ctx, const void *nonce, size_t nonce_size, @@ -46,3 +49,4 @@ aes_gcm_aead_decrypt(void *ctx, return 0; } +#endif /* GNUTLS_LIB_ACCELERATED_X86_AES_GCM_AEAD_H */ diff --git a/lib/accelerated/x86/aes-padlock.h b/lib/accelerated/x86/aes-padlock.h index cff3128f14..cd9dc23609 100644 --- a/lib/accelerated/x86/aes-padlock.h +++ b/lib/accelerated/x86/aes-padlock.h @@ -1,5 +1,5 @@ -#ifndef AES_PADLOCK_H -#define AES_PADLOCK_H +#ifndef GNUTLS_LIB_ACCELERATED_X86_AES_PADLOCK_H +#define GNUTLS_LIB_ACCELERATED_X86_AES_PADLOCK_H #include "gnutls_int.h" #include <aes-x86.h> @@ -43,4 +43,4 @@ int padlock_ecb_encrypt(void *out, const void *inp, struct padlock_cipher_data *ctx, size_t len); int padlock_cbc_encrypt(void *out, const void *inp, struct padlock_cipher_data *ctx, size_t len); -#endif +#endif /* GNUTLS_LIB_ACCELERATED_X86_AES_PADLOCK_H */ diff --git a/lib/accelerated/x86/aes-x86.h b/lib/accelerated/x86/aes-x86.h index 2fcd890980..92f54a6a90 100644 --- a/lib/accelerated/x86/aes-x86.h +++ b/lib/accelerated/x86/aes-x86.h @@ -1,5 +1,5 @@ -#ifndef AES_X86_H -#define AES_X86_H +#ifndef GNUTLS_LIB_ACCELERATED_X86_AES_X86_H +#define GNUTLS_LIB_ACCELERATED_X86_AES_X86_H #include "gnutls_int.h" @@ -62,4 +62,4 @@ extern const gnutls_crypto_cipher_st _gnutls_aes_ssse3; extern const gnutls_crypto_cipher_st _gnutls_aesni_x86; -#endif +#endif /* GNUTLS_LIB_ACCELERATED_X86_AES_X86_H */ diff --git a/lib/accelerated/x86/sha-padlock.h b/lib/accelerated/x86/sha-padlock.h index e489582b65..af67a07dd7 100644 --- a/lib/accelerated/x86/sha-padlock.h +++ b/lib/accelerated/x86/sha-padlock.h @@ -1,5 +1,5 @@ -#ifndef SHA_PADLOCK_H -#define SHA_PADLOCK_H +#ifndef GNUTLS_LIB_ACCELERATED_X86_SHA_PADLOCK_H +#define GNUTLS_LIB_ACCELERATED_X86_SHA_PADLOCK_H #include <nettle/sha.h> @@ -33,4 +33,4 @@ extern const struct nettle_hash padlock_sha512; extern const gnutls_crypto_mac_st _gnutls_hmac_sha_padlock_nano; extern const gnutls_crypto_digest_st _gnutls_sha_padlock_nano; -#endif +#endif /* GNUTLS_LIB_ACCELERATED_X86_SHA_PADLOCK_H */ diff --git a/lib/accelerated/x86/sha-x86.h b/lib/accelerated/x86/sha-x86.h index 3304212538..4724604bdd 100644 --- a/lib/accelerated/x86/sha-x86.h +++ b/lib/accelerated/x86/sha-x86.h @@ -1,5 +1,5 @@ -#ifndef SHA_X86_H -#define SHA_X86_H +#ifndef GNUTLS_LIB_ACCELERATED_X86_SHA_X86_H +#define GNUTLS_LIB_ACCELERATED_X86_SHA_X86_H #include <nettle/sha.h> @@ -19,4 +19,4 @@ void x86_sha512_update(struct sha512_ctx *ctx, size_t length, const uint8_t * da extern const gnutls_crypto_digest_st _gnutls_sha_x86_ssse3; extern const gnutls_crypto_mac_st _gnutls_hmac_sha_x86_ssse3; -#endif +#endif /* GNUTLS_LIB_ACCELERATED_X86_SHA_X86_H */ diff --git a/lib/accelerated/x86/x86-common.h b/lib/accelerated/x86/x86-common.h index c12f7e1177..0e2d86d510 100644 --- a/lib/accelerated/x86/x86-common.h +++ b/lib/accelerated/x86/x86-common.h @@ -19,6 +19,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ +#ifndef GNUTLS_LIB_ACCELERATED_X86_X86_COMMON_H +# define GNUTLS_LIB_ACCELERATED_X86_X86_COMMON_H #include <config.h> @@ -48,3 +50,5 @@ unsigned int gnutls_have_cpuid(void); (nettle_hash_update_func *) update_func, \ (nettle_hash_digest_func *) digest_func \ } + +#endif |