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 12:59:05 +0000 (13:59 +0100)
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;
                        }