aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-04-10 02:33:44 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-04-10 18:51:52 +0100
commit7a317fa07cf3d9952c574e7d214d371798fee42a (patch)
tree4a3a3405e2f93f4a1ce408e3ec0500e5d85bd976 /crypto/cms
parent34b0a927ab5c9232bcf864d524a9bf2558411700 (diff)
downloadopenssl-7a317fa07cf3d9952c574e7d214d371798fee42a.tar.gz
Fix ECDH key identifier support.
PR#3789 Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_kari.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c
index 5aaba59c11..69a51157e1 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 {