]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib/crypto, efi_loader: move some headers to include/crypto
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 21 Apr 2020 00:38:17 +0000 (09:38 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 4 May 2020 10:26:11 +0000 (12:26 +0200)
Pkcs7_parse.h and x509_parser.h are used in UEFI subsystem, in particular,
secure boot. So move them to include/crypto to avoid relative paths.

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>
include/crypto/pkcs7_parser.h [moved from lib/crypto/pkcs7_parser.h with 100% similarity]
include/crypto/x509_parser.h [moved from lib/crypto/x509_parser.h with 100% similarity]
lib/crypto/pkcs7_parser.c
lib/crypto/x509_cert_parser.c
lib/crypto/x509_public_key.c
lib/efi_loader/efi_image_loader.c
lib/efi_loader/efi_signature.c
lib/efi_loader/efi_variable.c
test/lib/asn1.c

index f5dda1179f8aa957eceb53b1ca9b57be9a271565..0ee207b6b1c8cf0588fe606c694146eb697f08c1 100644 (file)
 #include <linux/err.h>
 #include <linux/oid_registry.h>
 #include <crypto/public_key.h>
+#ifdef __UBOOT__
+#include <crypto/pkcs7_parser.h>
+#else
 #include "pkcs7_parser.h"
+#endif
 #include "pkcs7.asn1.h"
 
 MODULE_DESCRIPTION("PKCS#7 parser");
index 4e41cffd2301dc1d906556b447e297fd51393dce..18f5407a076cdd48b35cb80a0dd7c830f7ef58e8 100644 (file)
 #include <linux/string.h>
 #endif
 #include <crypto/public_key.h>
+#ifdef __UBOOT__
+#include <crypto/x509_parser.h>
+#else
 #include "x509_parser.h"
+#endif
 #include "x509.asn1.h"
 #include "x509_akid.asn1.h"
 
index 676c0df17410740957b022e837402950bed36ff8..571af9a0adf9373fb9539a499c7c1841b1596ca6 100644 (file)
 #include <linux/module.h>
 #endif
 #include <linux/kernel.h>
-#ifndef __UBOOT__
+#ifdef __UBOOT__
+#include <crypto/x509_parser.h>
+#else
 #include <linux/slab.h>
 #include <keys/asymmetric-subtype.h>
 #include <keys/asymmetric-parser.h>
 #include <keys/system_keyring.h>
 #include <crypto/hash.h>
 #include "asymmetric_keys.h"
-#endif
 #include "x509_parser.h"
+#endif
 
 /*
  * Set up the signature parameters in an X.509 certificate.  This involves
index 6c270ce94f445feb8a2f038f522773dc6e61544f..5a9a6424cc143962111d38a3eb4de2c98c2fc099 100644 (file)
@@ -13,7 +13,7 @@
 #include <malloc.h>
 #include <pe.h>
 #include <sort.h>
-#include "../lib/crypto/pkcs7_parser.h"
+#include "crypto/pkcs7_parser.h"
 
 const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
 const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID;
index 658e3547da379d7aefcf2019c3a96dd1806a7f0a..150ce41f366124805959e6ecaef12e9bbef339d4 100644 (file)
 #include <image.h>
 #include <hexdump.h>
 #include <malloc.h>
+#include <crypto/pkcs7_parser.h>
 #include <linux/compat.h>
 #include <linux/oid_registry.h>
 #include <u-boot/rsa.h>
 #include <u-boot/sha256.h>
-#include "../lib/crypto/pkcs7_parser.h"
 
 const efi_guid_t efi_guid_image_security_database =
                EFI_IMAGE_SECURITY_DATABASE_GUID;
index 7df881a74b4496d24e44e930926c9d0e51ff4508..0c6d1deb58eb03062a28b495625b0ea03e864c86 100644 (file)
@@ -12,9 +12,9 @@
 #include <malloc.h>
 #include <rtc.h>
 #include <search.h>
+#include <crypto/pkcs7_parser.h>
 #include <linux/compat.h>
 #include <u-boot/crc.h>
-#include "../lib/crypto/pkcs7_parser.h"
 
 enum efi_secure_mode {
        EFI_MODE_SETUP,
index d2b3f67e68da211d2a5212738dc3bfbd2808b366..8661fdd30687e0d4fb226a24f33e338abab5d279 100644 (file)
 #include <test/ut.h>
 
 #ifdef CONFIG_PKCS7_MESSAGE_PARSER
-#include "../../lib/crypto/pkcs7_parser.h"
+#include <crypto/pkcs7_parser.h>
 #else
 #ifdef CONFIG_X509_CERTIFICATE_PARSER
-#include "../../lib/crypto/x509_parser.h"
+#include <crypto/x509_parser.h>
 #endif
 #endif