diff mbox series

[07/74] backports: align x509_loader with newer kernels

Message ID 20240524190906.5f730413052a.Icf65a934f1a62061da526c1c37f0c4ecf2b3c38a@changeid (mailing list archive)
State New
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:07 p.m. UTC
From: Gregory Greenman <gregory.greenman@intel.com>

x509_load_certificate_list() was exported in kernel v6.3
by the commit
3609ff6401c3 ("wifi: cfg80211: Deduplicate certificate loading")
There's no any spcial Kconfig dependency for that, so make
it depend on the kernel version.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/keys/asymmetric-type.h | 7 ++++++-
 backport/compat/Makefile                         | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/backport/backport-include/keys/asymmetric-type.h b/backport/backport-include/keys/asymmetric-type.h
index 35ddd4008c60..7467be40d4fe 100644
--- a/backport/backport-include/keys/asymmetric-type.h
+++ b/backport/backport-include/keys/asymmetric-type.h
@@ -32,5 +32,10 @@  extern struct key *find_asymmetric_key(struct key *keyring,
 				       const struct asymmetric_key_id *id_1,
 				       const struct asymmetric_key_id *id_2,
 				       bool partial);
+
 #endif
-#endif /* __BP_ASYMMETRIC_TYPE_H */
+
+int x509_load_certificate_list(const u8 cert_list[], const unsigned long list_size,
+			       const struct key *keyring);
+
+#endif /* _KEYS_ASYMMETRIC_TYPE_H */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 7c56e92f5ca4..1d47bd59fe90 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -36,6 +36,8 @@  compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/oid.o
 compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/asn1parse.o
 compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/rsapubkey.asn1.o
 
+compat-$(CPTCFG_KERNEL_6_3) += verification/x509_loader.o
+
 $(obj)/lib-oid_registry.o: $(obj)/oid_registry_data.c
 
 $(obj)/oid_registry_data.c: $(src)/../include/linux/backport-oid_registry.h \