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_0_9_8za~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f51f3741995dd4f50d4d80d8b8bcc37741f64729;p=oweals%2Fopenssl.git Set Enveloped data version to 2 if ktri version not zero. (cherry picked from commit 9c5d953a07f472452ae2cb578e39eddea2de2b9c) --- diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index b8685fa175..f53336b5ff 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