[PATCH 103/106] crypto: convert exported crypto symbol into pluggable interface for CONFIG_PKCS7_TEST_KEY crypto
Jay Wang
wanjay at amazon.com
Wed Feb 11 18:47:19 PST 2026
Apply Crypto API wrappers to the exported crypto symbol in
CONFIG_PKCS7_TEST_KEY-related crypto to convert them into pluggable
interface.
Signed-off-by: Jay Wang <wanjay at amazon.com>
---
crypto/asymmetric_keys/Makefile | 2 +-
crypto/asymmetric_keys/pkcs7_key_type.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile
index 3fdd11ea399a..6a17f563c359 100644
--- a/crypto/asymmetric_keys/Makefile
+++ b/crypto/asymmetric_keys/Makefile
@@ -63,7 +63,7 @@ $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
#
# PKCS#7 parser testing key
#
-obj-$(CONFIG_PKCS7_TEST_KEY) += pkcs7_test_key.o
+crypto-objs-$(CONFIG_PKCS7_TEST_KEY) += pkcs7_test_key.o
pkcs7_test_key-y := \
pkcs7_key_type.o
diff --git a/crypto/asymmetric_keys/pkcs7_key_type.c b/crypto/asymmetric_keys/pkcs7_key_type.c
index b930d3bbf1af..a6921222ced1 100644
--- a/crypto/asymmetric_keys/pkcs7_key_type.c
+++ b/crypto/asymmetric_keys/pkcs7_key_type.c
@@ -4,8 +4,8 @@
* Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells at redhat.com)
*/
-
#define pr_fmt(fmt) "PKCS7key: "fmt
+#include <crypto/api.h>
#include <linux/key.h>
#include <linux/err.h>
#include <linux/module.h>
@@ -91,5 +91,5 @@ static void __exit pkcs7_key_cleanup(void)
unregister_key_type(&key_type_pkcs7);
}
-module_init(pkcs7_key_init);
-module_exit(pkcs7_key_cleanup);
+crypto_module_init(pkcs7_key_init);
+crypto_module_exit(pkcs7_key_cleanup);
--
2.47.3
More information about the linux-arm-kernel
mailing list