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 8c6d91f..b6b6ca1 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;
                        }