diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2014-07-08 19:10:46 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-09 15:58:37 +0200 |
commit | dd7d66f21b9eb6a3979d8c9ba910eba772cfbbc9 (patch) | |
tree | 745a0854a9deecb94701975d0e8afb41c06538f9 /crypto/asymmetric_keys/mscode_parser.c | |
parent | pefile: Parse the "Microsoft individual code signing" data blob (diff) | |
download | linux-dd7d66f21b9eb6a3979d8c9ba910eba772cfbbc9.tar.xz linux-dd7d66f21b9eb6a3979d8c9ba910eba772cfbbc9.zip |
pefile: Handle pesign using the wrong OID
The pesign utility had a bug where it was using OID_msIndividualSPKeyPurpose
instead of OID_msPeImageDataObjId - so allow both OIDs.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/mscode_parser.c')
-rw-r--r-- | crypto/asymmetric_keys/mscode_parser.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/mscode_parser.c b/crypto/asymmetric_keys/mscode_parser.c index 09336c32b3d4..214a992123cd 100644 --- a/crypto/asymmetric_keys/mscode_parser.c +++ b/crypto/asymmetric_keys/mscode_parser.c @@ -58,7 +58,13 @@ int mscode_note_content_type(void *context, size_t hdrlen, return -EBADMSG; } - if (oid != OID_msIndividualSPKeyPurpose) { + /* + * pesign utility had a bug where it was putting + * OID_msIndividualSPKeyPurpose instead of OID_msPeImageDataObjId + * So allow both OIDs. + */ + if (oid != OID_msPeImageDataObjId && + oid != OID_msIndividualSPKeyPurpose) { pr_err("Unexpected content type OID %u\n", oid); return -EBADMSG; } |