[RFC v2 5/6] kernel/sysdata_signing: export data_verify_pkcs7()

From: Luis R. Rodriguez
Date: Wed May 13 2015 - 14:37:12 EST


From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx>

This will be used for firmware signature check support.

Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Ming Lei <ming.lei@xxxxxxxxxxxxx>
Cc: Seth Forshee <seth.forshee@xxxxxxxxxxxxx>
Cc: Kyle McMartin <kyle@xxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxx>
---
kernel/sysdata-internal.h | 2 ++
kernel/sysdata_signing.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/sysdata-internal.h b/kernel/sysdata-internal.h
index 0aa573e..52a5c42 100644
--- a/kernel/sysdata-internal.h
+++ b/kernel/sysdata-internal.h
@@ -10,3 +10,5 @@
*/

extern int sysdata_verify_sig(const void *data, unsigned long *_len);
+int data_verify_pkcs7(const void *data, unsigned long len,
+ const void *raw_pkcs7, size_t pkcs7_len);
diff --git a/kernel/sysdata_signing.c b/kernel/sysdata_signing.c
index adc44d4..6759c54 100644
--- a/kernel/sysdata_signing.c
+++ b/kernel/sysdata_signing.c
@@ -39,8 +39,8 @@ struct sysdata_signature {
/*
* Verify a PKCS#7-based signature on system data.
*/
-static int data_verify_pkcs7(const void *data, unsigned long len,
- const void *raw_pkcs7, size_t pkcs7_len)
+int data_verify_pkcs7(const void *data, unsigned long len,
+ const void *raw_pkcs7, size_t pkcs7_len)
{
struct pkcs7_message *pkcs7;
bool trusted;
@@ -75,6 +75,7 @@ error:
pr_devel("<==%s() = %d\n", __func__, ret);
return ret;
}
+EXPORT_SYMBOL_GPL(data_verify_pkcs7);

/*
* Verify the signature on system data.
--
2.3.2.209.gd67f9d5.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/