aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/cms
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2010-03-13 19:22:41 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2010-03-13 19:22:41 +0000
commit6a599222bb564010b80b78eef3f2b6ba6c8db14a (patch)
tree909a7c21b7df72ae8c08b80b468a4dd75b3820be /crypto/openssl/crypto/cms
parentc5af82e51782b019d13e562a07c17dc19a282de2 (diff)
parentf7a1b4761cf3f798e1b42d703d38221b47ce1eec (diff)
downloadsrc-6a599222bb564010b80b78eef3f2b6ba6c8db14a.tar.gz
src-6a599222bb564010b80b78eef3f2b6ba6c8db14a.zip
Merge OpenSSL 0.9.8m into head.
This also "reverts" some FreeBSD local changes so we should now be back to using entirely stock OpenSSL. The local changes were simple $FreeBSD$ lines additions, which were required in the CVS days, and the patch for FreeBSD-SA-09:15.ssl which has been superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation extension' support. MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=205128
Diffstat (limited to 'crypto/openssl/crypto/cms')
-rw-r--r--crypto/openssl/crypto/cms/cms_ess.c4
-rw-r--r--crypto/openssl/crypto/cms/cms_lib.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/cms/cms_ess.c b/crypto/openssl/crypto/cms/cms_ess.c
index ed34ff32282a..65613aab6529 100644
--- a/crypto/openssl/crypto/cms/cms_ess.c
+++ b/crypto/openssl/crypto/cms/cms_ess.c
@@ -344,7 +344,7 @@ int cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms)
/* Get original receipt request details */
- if (!CMS_get1_ReceiptRequest(osi, &rr))
+ if (CMS_get1_ReceiptRequest(osi, &rr) <= 0)
{
CMSerr(CMS_F_CMS_RECEIPT_VERIFY, CMS_R_NO_RECEIPT_REQUEST);
goto err;
@@ -385,7 +385,7 @@ ASN1_OCTET_STRING *cms_encode_Receipt(CMS_SignerInfo *si)
/* Get original receipt request details */
- if (!CMS_get1_ReceiptRequest(si, &rr))
+ if (CMS_get1_ReceiptRequest(si, &rr) <= 0)
{
CMSerr(CMS_F_CMS_ENCODE_RECEIPT, CMS_R_NO_RECEIPT_REQUEST);
goto err;
diff --git a/crypto/openssl/crypto/cms/cms_lib.c b/crypto/openssl/crypto/cms/cms_lib.c
index 8e6c1d29a52c..cc00526d3e07 100644
--- a/crypto/openssl/crypto/cms/cms_lib.c
+++ b/crypto/openssl/crypto/cms/cms_lib.c
@@ -415,7 +415,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;