From ba44b8d42e6dbe4f95d279b8b6708530de9a5cac Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 6 May 2014 14:02:17 +0100 Subject: [PATCH] Set Enveloped data version to 2 if ktri version not zero. (cherry picked from commit 9c5d953a07f472452ae2cb578e39eddea2de2b9c) --- crypto/cms/cms_env.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index b398f6990b..ffb24a7c40 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -186,6 +186,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 -- 2.40.0