summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2014-07-08 18:10:46 +0100
committerDavid Howells <dhowells@redhat.com>2014-07-09 14:58:37 +0100
commit8e1561e67b44b9439e02336dabfeb903040a7392 (patch)
tree52e99866afa1f78e6391387e258f7f4089f95080
parentd93f05b21d04eab7ed1a289c7731163641be8dc6 (diff)
downloadlinux-crypto-8e1561e67b44b9439e02336dabfeb903040a7392.tar.gz
linux-crypto-8e1561e67b44b9439e02336dabfeb903040a7392.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>
-rw-r--r--crypto/asymmetric_keys/mscode_parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/mscode_parser.c b/crypto/asymmetric_keys/mscode_parser.c
index 09336c32..214a9921 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;
}