]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib/crypto, efi_loader: avoid multiple inclusions of header files
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 21 Apr 2020 00:37:52 +0000 (09:37 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 4 May 2020 10:26:11 +0000 (12:26 +0200)
By adding extra symbols, we can now avoid including x509_parser and
pkcs7_parser.h files multiple times.

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Don't include include x509_parser.h twice.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/crypto/pkcs7_parser.h
lib/crypto/x509_parser.h

index 6565fdc2d4cac2bc49bfa629edde67b875573cb7..b8234da45a6a25fb2a9b17daeaa8d3666cd2d2b3 100644 (file)
@@ -5,6 +5,9 @@
  * Written by David Howells (dhowells@redhat.com)
  */
 
+#ifndef _PKCS7_PARSER_H
+#define _PKCS7_PARSER_H
+
 #include <linux/oid_registry.h>
 #include <crypto/pkcs7.h>
 #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 */
index c233f136fb354db9987bf72fcba9b6560b6b30bf..4cbdc1d6612d7f9ec29e3fc70fed3e5dd6eb9cf5 100644 (file)
@@ -5,6 +5,9 @@
  * Written by David Howells (dhowells@redhat.com)
  */
 
+#ifndef _X509_PARSER_H
+#define _X509_PARSER_H
+
 #include <linux/time.h>
 #include <crypto/public_key.h>
 #include <keys/asymmetric-type.h>
@@ -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 */