projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17ebc10
)
tolerate broken CMS/PKCS7 implementations using signature OID instead of digest
author
Dr. Stephen Henson
<steve@openssl.org>
Tue, 2 Feb 2010 14:30:39 +0000
(14:30 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Tue, 2 Feb 2010 14:30:39 +0000
(14:30 +0000)
crypto/cms/cms_lib.c
patch
|
blob
|
history
diff --git
a/crypto/cms/cms_lib.c
b/crypto/cms/cms_lib.c
index 714b1d9b1c87c010f3fcb64402e1ca892512aebf..b62d1bfac02b750f59021e74de3d5c2fa81ad772 100644
(file)
--- a/
crypto/cms/cms_lib.c
+++ b/
crypto/cms/cms_lib.c
@@
-406,7
+406,11
@@
int cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
return 0;
}
BIO_get_md_ctx(chain, &mtmp);
- if (EVP_MD_CTX_type(mtmp) == nid)
+ if (EVP_MD_CTX_type(mtmp) == nid
+ /* Workaround for broken implementations that use signature
+ * algorithm OID instead of digest.
+ */
+ || EVP_MD_pkey_type(EVP_MD_CTX_md(mtmp)) == nid)
return EVP_MD_CTX_copy_ex(mctx, mtmp);
chain = BIO_next(chain);
}