[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Dr. Stephen Henson steve at openssl.org
Fri Apr 10 17:53:42 UTC 2015


The branch OpenSSL_1_0_2-stable has been updated
       via  07395b7a6dfdbe263677e58519f1d11d51d31da5 (commit)
       via  784f155e0d39cff1fd6e76e75c07f56ae25ebced (commit)
      from  42802a94be61c9378ead72bb40f02c8b33f1f6e6 (commit)


- Log -----------------------------------------------------------------
commit 07395b7a6dfdbe263677e58519f1d11d51d31da5
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Apr 10 02:33:44 2015 +0100

    Fix ECDH key identifier support.
    
    PR#3789
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 7a317fa07cf3d9952c574e7d214d371798fee42a)

commit 784f155e0d39cff1fd6e76e75c07f56ae25ebced
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Apr 10 02:31:16 2015 +0100

    Fix ECDH detection, add ECDH keyid test.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 9fdbc9df76a68a30df349c53f1ceeb915f82948c)

-----------------------------------------------------------------------

Summary of changes:
 crypto/cms/cms_kari.c |  4 ++++
 test/cms-test.pl      | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c
index f8a6cba..2cfcdb2 100644
--- a/crypto/cms/cms_kari.c
+++ b/crypto/cms/cms_kari.c
@@ -66,6 +66,7 @@
 DECLARE_ASN1_ITEM(CMS_KeyAgreeRecipientInfo)
 DECLARE_ASN1_ITEM(CMS_RecipientEncryptedKey)
 DECLARE_ASN1_ITEM(CMS_OriginatorPublicKey)
+DECLARE_ASN1_ITEM(CMS_RecipientKeyIdentifier)
 
 /* Key Agreement Recipient Info (KARI) routines */
 
@@ -362,6 +363,9 @@ int cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip,
 
     if (flags & CMS_USE_KEYID) {
         rek->rid->type = CMS_REK_KEYIDENTIFIER;
+        rek->rid->d.rKeyId = M_ASN1_new_of(CMS_RecipientKeyIdentifier);
+        if (rek->rid->d.rKeyId == NULL)
+            return 0;
         if (!cms_set1_keyid(&rek->rid->d.rKeyId->subjectKeyIdentifier, recip))
             return 0;
     } else {
diff --git a/test/cms-test.pl b/test/cms-test.pl
index 51abeef..baa3b59 100644
--- a/test/cms-test.pl
+++ b/test/cms-test.pl
@@ -128,7 +128,7 @@ else
 	die "Error checking for EC2M support\n";
 	}
 
-system ("$ossl_path no-ecdh > $null_path");
+system ("$ossl_path no-ec > $null_path");
 if ($? == 0)
 	{
 	$no_ecdh = 1;
@@ -453,6 +453,14 @@ my @smime_cms_param_tests = (
     ],
 
     [
+"enveloped content test streaming S/MIME format, ECDH, key identifier",
+        "-encrypt -keyid -in smcont.txt"
+          . " -stream -out test.cms"
+          . " -recip $smdir/smec1.pem",
+        "-decrypt -recip $smdir/smec1.pem -in test.cms -out smtst.txt"
+    ],
+
+    [
 "enveloped content test streaming S/MIME format, ECDH, AES128, SHA256 KDF",
         "-encrypt -in smcont.txt"
           . " -stream -out test.cms"


More information about the openssl-commits mailing list