[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Fri Apr 10 17:52:28 UTC 2015


The branch master has been updated
       via  9fdbc9df76a68a30df349c53f1ceeb915f82948c (commit)
       via  7a317fa07cf3d9952c574e7d214d371798fee42a (commit)
      from  34b0a927ab5c9232bcf864d524a9bf2558411700 (commit)


- Log -----------------------------------------------------------------
commit 9fdbc9df76a68a30df349c53f1ceeb915f82948c
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>

commit 7a317fa07cf3d9952c574e7d214d371798fee42a
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>

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

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 5aaba59..69a5115 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 */
 
@@ -360,6 +361,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