From: AKASHI Takahiro Date: Tue, 21 Apr 2020 00:37:52 +0000 (+0900) Subject: lib/crypto, efi_loader: avoid multiple inclusions of header files X-Git-Tag: v2020.07-rc2~11^2~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b8b63fb8ead9bd4041ab5424deb465f14ee172a;p=oweals%2Fu-boot.git lib/crypto, efi_loader: avoid multiple inclusions of header files By adding extra symbols, we can now avoid including x509_parser and pkcs7_parser.h files multiple times. Suggested-by: Heinrich Schuchardt Signed-off-by: AKASHI Takahiro Don't include include x509_parser.h twice. Reviewed-by: Heinrich Schuchardt --- diff --git a/lib/crypto/pkcs7_parser.h b/lib/crypto/pkcs7_parser.h index 6565fdc2d4..b8234da45a 100644 --- a/lib/crypto/pkcs7_parser.h +++ b/lib/crypto/pkcs7_parser.h @@ -5,6 +5,9 @@ * Written by David Howells (dhowells@redhat.com) */ +#ifndef _PKCS7_PARSER_H +#define _PKCS7_PARSER_H + #include #include #include "x509_parser.h" @@ -63,3 +66,4 @@ struct pkcs7_message { size_t data_hdrlen; /* Length of Data ASN.1 header */ const void *data; /* Content Data (or 0) */ }; +#endif /* _PKCS7_PARSER_H */ diff --git a/lib/crypto/x509_parser.h b/lib/crypto/x509_parser.h index c233f136fb..4cbdc1d661 100644 --- a/lib/crypto/x509_parser.h +++ b/lib/crypto/x509_parser.h @@ -5,6 +5,9 @@ * Written by David Howells (dhowells@redhat.com) */ +#ifndef _X509_PARSER_H +#define _X509_PARSER_H + #include #include #include @@ -55,3 +58,4 @@ extern int x509_decode_time(time64_t *_t, size_t hdrlen, */ extern int x509_get_sig_params(struct x509_certificate *cert); extern int x509_check_for_self_signed(struct x509_certificate *cert); +#endif /* _X509_PARSER_H */