GH1141: Different fix, preferred by Richard.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2016-06-13 09:51:12 -04:00
parent b4b576d3b7
commit 35096e912c

View file

@ -833,10 +833,10 @@ static void cms_env_set_version(CMS_EnvelopedData *env)
env->version = 2;
}
}
if (env->version == 2)
return;
if (env->originatorInfo || env->unprotectedAttrs)
env->version = 2;
if (env->version == 2)
return;
env->version = 0;
}