RT3246: req command prints version number wrong
[oweals/openssl.git] / 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;
                        }