From: Dr. Stephen Henson Date: Tue, 6 May 2014 13:02:17 +0000 (+0100) Subject: Set Enveloped data version to 2 if ktri version not zero. X-Git-Tag: OpenSSL_1_0_1h~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c5d953a07f472452ae2cb578e39eddea2de2b9c;p=openssl Set Enveloped data version to 2 if ktri version not zero. --- diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index be20b1c024..add00bf99c 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, if (flags & CMS_USE_KEYID) { ktri->version = 2; + if (env->version < 2) + env->version = 2; type = CMS_RECIPINFO_KEYIDENTIFIER; } else