summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/pkcs7_parser.c
diff options
context:
space:
mode:
authorDavid Howells2018-10-09 18:47:15 +0200
committerJames Morris2018-10-26 10:30:46 +0200
commit039884907787e55166e84e0b654a5342cc8a04ab (patch)
treefb7cdbe592729653377a85303a9ce3b162a73e2d /crypto/asymmetric_keys/pkcs7_parser.c
parentKEYS: Provide missing asymmetric key subops for new key type ops [ver #2] (diff)
downloadkernel-qcow2-linux-039884907787e55166e84e0b654a5342cc8a04ab.tar.gz
kernel-qcow2-linux-039884907787e55166e84e0b654a5342cc8a04ab.tar.xz
kernel-qcow2-linux-039884907787e55166e84e0b654a5342cc8a04ab.zip
KEYS: Make the X.509 and PKCS7 parsers supply the sig encoding type [ver #2]
Make the X.509 and PKCS7 parsers fill in the signature encoding type field recently added to the public_key_signature struct. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Denis Kenzior <denkenz@gmail.com> Tested-by: Denis Kenzior <denkenz@gmail.com> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'crypto/asymmetric_keys/pkcs7_parser.c')
-rw-r--r--crypto/asymmetric_keys/pkcs7_parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
index 0f134162cef4..f0d56e1a8b7e 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -271,6 +271,7 @@ int pkcs7_sig_note_pkey_algo(void *context, size_t hdrlen,
switch (ctx->last_oid) {
case OID_rsaEncryption:
ctx->sinfo->sig->pkey_algo = "rsa";
+ ctx->sinfo->sig->encoding = "pkcs1";
break;
default:
printk("Unsupported pkey algo: %u\n", ctx->last_oid);