]> granicus.if.org Git - openssl/commitdiff
Set Enveloped data version to 2 if ktri version not zero.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 5 May 2014 22:56:43 +0000 (23:56 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 May 2014 13:00:11 +0000 (14:00 +0100)
(cherry picked from commit 546b1b438468e629eea4e836190b1bb056e39286)

crypto/cms/cms_env.c

index 8c6d91f3c88143e3c754c9833a26a57688753836..b6b6ca169665f47342159dc6b4e07d07f5164033 100644 (file)
@@ -973,7 +973,7 @@ static void cms_env_set_version(CMS_EnvelopedData *env)
                        env->version = 3;
                        return;
                        }
-               else if (ri->type != CMS_RECIPINFO_TRANS)
+               else if (ri->type != CMS_RECIPINFO_TRANS || ri->d.ktri->version != 0)
                        {
                        env->version = 2;
                        }