summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-04-28 12:11:13 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-07 21:10:46 +0200
commit8a8dbe77dd5c0a0d0809760ab7cebf8bfcdf051f (patch)
treec100b1c3a2430ceb31ed3ea3914a7049b224e09b
parentc14347f3c683f7e2da4949b2325e61e7ac8c7db3 (diff)
downloadgnutls-8a8dbe77dd5c0a0d0809760ab7cebf8bfcdf051f.tar.gz
Add or clean header guards in lib/x509/
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
-rw-r--r--lib/x509/attributes.h5
-rw-r--r--lib/x509/common.h6
-rw-r--r--lib/x509/ip-in-cidr.h5
-rw-r--r--lib/x509/ip.h6
-rw-r--r--lib/x509/krb5.h5
-rw-r--r--lib/x509/ocsp.h5
-rw-r--r--lib/x509/pkcs7_int.h6
-rw-r--r--lib/x509/prov-seed.h5
-rw-r--r--lib/x509/verify-high.h6
-rw-r--r--lib/x509/virt-san.h6
-rw-r--r--lib/x509/x509_ext_int.h6
-rw-r--r--lib/x509/x509_int.h6
12 files changed, 46 insertions, 21 deletions
diff --git a/lib/x509/attributes.h b/lib/x509/attributes.h
index 0d9314aa18..c148935b75 100644
--- a/lib/x509/attributes.h
+++ b/lib/x509/attributes.h
@@ -20,6 +20,9 @@
*
*/
+#ifndef GNUTLS_LIB_X509_ATTRIBUTES_H
+#define GNUTLS_LIB_X509_ATTRIBUTES_H
+
int
_x509_parse_attribute(ASN1_TYPE asn1_struct,
const char *attr_name, const char *given_oid, unsigned indx,
@@ -28,3 +31,5 @@ _x509_parse_attribute(ASN1_TYPE asn1_struct,
int
_x509_set_attribute(ASN1_TYPE asn, const char *root,
const char *ext_id, const gnutls_datum_t * ext_data);
+
+#endif /* GNUTLS_LIB_X509_ATTRIBUTES_H */
diff --git a/lib/x509/common.h b/lib/x509/common.h
index 99b767a694..8b60973388 100644
--- a/lib/x509/common.h
+++ b/lib/x509/common.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef COMMON_H
-#define COMMON_H
+#ifndef GNUTLS_LIB_X509_COMMON_H
+#define GNUTLS_LIB_X509_COMMON_H
#include <algorithms.h>
#include <abstract_int.h>
@@ -287,4 +287,4 @@ inline static int _asn1_strict_der_decode (asn1_node * element, const void *ider
return asn1_der_decoding2(element, ider, &len, _ASN1_DER_FLAGS, errorDescription);
}
-#endif
+#endif /* GNUTLS_LIB_X509_COMMON_H */
diff --git a/lib/x509/ip-in-cidr.h b/lib/x509/ip-in-cidr.h
index 40a65e637c..d5e26eb948 100644
--- a/lib/x509/ip-in-cidr.h
+++ b/lib/x509/ip-in-cidr.h
@@ -21,6 +21,9 @@
*
*/
+#ifndef GNUTLS_LIB_X509_IP_IN_CIDR_H
+#define GNUTLS_LIB_X509_IP_IN_CIDR_H
+
/*-
* ip_in_cidr:
* @ip: IP datum (IPv4 or IPv6)
@@ -51,3 +54,5 @@ static unsigned ip_in_cidr(const gnutls_datum_t *ip, const gnutls_datum_t *cidr)
return 1; /* match */
}
+
+#endif /* GNUTLS_LIB_X509_IP_IN_CIDR_H */
diff --git a/lib/x509/ip.h b/lib/x509/ip.h
index 86f9975d91..2c8569b889 100644
--- a/lib/x509/ip.h
+++ b/lib/x509/ip.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef IP_H
-#define IP_H
+#ifndef GNUTLS_LIB_X509_IP_H
+#define GNUTLS_LIB_X509_IP_H
// for documentation, see the definition
int _gnutls_mask_to_prefix(const unsigned char *mask, unsigned mask_size);
@@ -36,4 +36,4 @@ const char *_gnutls_cidr_to_string(const void *_ip, unsigned int ip_size, char *
// for documentation, see the definition
int _gnutls_mask_ip(unsigned char *ip, const unsigned char *mask, unsigned ipsize);
-#endif // IP_H
+#endif /* GNUTLS_LIB_X509_IP_H */
diff --git a/lib/x509/krb5.h b/lib/x509/krb5.h
index 6824fde8cc..d8926af67a 100644
--- a/lib/x509/krb5.h
+++ b/lib/x509/krb5.h
@@ -18,5 +18,10 @@
* <https://www.gnu.org/licenses/>.
*/
+#ifndef GNUTLS_LIB_X509_KRB5_H
+#define GNUTLS_LIB_X509_KRB5_H
+
int _gnutls_krb5_principal_to_der(const char *name, gnutls_datum_t * der);
int _gnutls_krb5_der_to_principal(const gnutls_datum_t * der, gnutls_datum_t *name);
+
+#endif /* GNUTLS_LIB_X509_KRB5_H */
diff --git a/lib/x509/ocsp.h b/lib/x509/ocsp.h
index 76bc309bb3..3f63a5bfe2 100644
--- a/lib/x509/ocsp.h
+++ b/lib/x509/ocsp.h
@@ -20,6 +20,9 @@
*
*/
+#ifndef GNUTLS_LIB_X509_OCSP_H
+#define GNUTLS_LIB_X509_OCSP_H
+
/* Online Certificate Status Protocol - RFC 2560
*/
#include <gnutls/ocsp.h>
@@ -30,3 +33,5 @@
time_t _gnutls_ocsp_get_validity(gnutls_ocsp_resp_t resp);
#define MAX_OCSP_MSG_SIZE 128
const char *_gnutls_ocsp_verify_status_to_str(gnutls_ocsp_verify_reason_t r, char out[MAX_OCSP_MSG_SIZE]);
+
+#endif /* GNUTLS_LIB_X509_OCSP_H */
diff --git a/lib/x509/pkcs7_int.h b/lib/x509/pkcs7_int.h
index 69e2873e56..97a01d7a40 100644
--- a/lib/x509/pkcs7_int.h
+++ b/lib/x509/pkcs7_int.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef PKCS7_INT_H
-#define PKCS7_INT_H
+#ifndef GNUTLS_LIB_X509_PKCS7_INT_H
+#define GNUTLS_LIB_X509_PKCS7_INT_H
#include <gnutls/x509.h>
@@ -131,4 +131,4 @@ int
_gnutls_pkcs7_data_enc_info(const gnutls_datum_t * data, const struct pkcs_cipher_schema_st **p,
struct pbkdf2_params *kdf_params, char **oid);
-#endif
+#endif /* GNUTLS_LIB_X509_PKCS7_INT_H */
diff --git a/lib/x509/prov-seed.h b/lib/x509/prov-seed.h
index d9dd8e6948..a7753ccb50 100644
--- a/lib/x509/prov-seed.h
+++ b/lib/x509/prov-seed.h
@@ -20,5 +20,10 @@
*
*/
+#ifndef GNUTLS_LIB_X509_PROV_SEED_H
+#define GNUTLS_LIB_X509_PROV_SEED_H
+
int _x509_encode_provable_seed(gnutls_x509_privkey_t pkey, gnutls_datum_t *der);
int _x509_decode_provable_seed(gnutls_x509_privkey_t pkey, const gnutls_datum_t *der);
+
+#endif /* GNUTLS_LIB_X509_PROV_SEED_H */
diff --git a/lib/x509/verify-high.h b/lib/x509/verify-high.h
index 68430fddba..ca1f98b831 100644
--- a/lib/x509/verify-high.h
+++ b/lib/x509/verify-high.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef VERIFY_HIGH_H
-# define VERIFY_HIGH_H
+#ifndef GNUTLS_LIB_X509_VERIFY_HIGH_H
+#define GNUTLS_LIB_X509_VERIFY_HIGH_H
struct gnutls_x509_trust_list_st {
unsigned int size;
@@ -46,4 +46,4 @@ struct gnutls_x509_trust_list_st {
int _gnutls_trustlist_inlist(gnutls_x509_trust_list_t list,
gnutls_x509_crt_t cert);
-#endif
+#endif /* GNUTLS_LIB_X509_VERIFY_HIGH_H */
diff --git a/lib/x509/virt-san.h b/lib/x509/virt-san.h
index c9fe3f7b55..44b6fe65c5 100644
--- a/lib/x509/virt-san.h
+++ b/lib/x509/virt-san.h
@@ -19,11 +19,11 @@
*
*/
-#ifndef VIRT_SAN_H
-# define VIRT_SAN_H
+#ifndef GNUTLS_LIB_X509_VIRT_SAN_H
+#define GNUTLS_LIB_X509_VIRT_SAN_H
#include "x509_ext_int.h"
int _gnutls_alt_name_assign_virt_type(struct name_st *name, unsigned type, gnutls_datum_t *san, const char *othername_oid, unsigned raw);
-#endif
+#endif /* GNUTLS_LIB_X509_VIRT_SAN_H */
diff --git a/lib/x509/x509_ext_int.h b/lib/x509/x509_ext_int.h
index d1a395a6f8..2e3f162a5d 100644
--- a/lib/x509/x509_ext_int.h
+++ b/lib/x509/x509_ext_int.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef X509_EXT_INT_H
-#define X509_EXT_INT_H
+#ifndef GNUTLS_LIB_X509_X509_EXT_INT_H
+#define GNUTLS_LIB_X509_X509_EXT_INT_H
#include "gnutls_int.h"
struct name_st {
@@ -31,4 +31,4 @@ struct name_st {
int _gnutls_alt_name_process(gnutls_datum_t *out, unsigned type, const gnutls_datum_t *san, unsigned raw);
-#endif
+#endif /* GNUTLS_LIB_X509_X509_EXT_INT_H */
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index 353eb8cdc4..3b94fc50da 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef X509_H
-#define X509_H
+#ifndef GNUTLS_LIB_X509_X509_INT_H
+#define GNUTLS_LIB_X509_X509_INT_H
#include <gnutls/x509.h>
#include <gnutls/x509-ext.h>
@@ -546,4 +546,4 @@ struct gnutls_x509_tlsfeatures_st {
unsigned _gnutls_is_broken_sig_allowed(const gnutls_sign_entry_st *se, unsigned int flags);
-#endif
+#endif /* GNUTLS_LIB_X509_X509_INT_H */