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:
8b354e7
)
tolerate broken CMS/PKCS7 implementations using signature OID instead of digest
author
Dr. Stephen Henson
<steve@openssl.org>
Tue, 2 Feb 2010 14:26:32 +0000
(14:26 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Tue, 2 Feb 2010 14:26:32 +0000
(14:26 +0000)
crypto/cms/cms_lib.c
patch
|
blob
|
history
diff --git
a/crypto/cms/cms_lib.c
b/crypto/cms/cms_lib.c
index 6c0d5c097cc213fd35cb978fb17926f17003d2ba..d00fe0f87b37627aa8239f0760abe2efabfc18c4 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)
{
EVP_MD_CTX_copy_ex(mctx, mtmp);
return 1;