]> granicus.if.org Git - openssl/commitdiff
Set Enveloped data version to 2 if ktri version not zero.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 6 May 2014 13:02:17 +0000 (14:02 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 May 2014 13:02:38 +0000 (14:02 +0100)
crypto/cms/cms_env.c

index be20b1c024cfca77267ce3a0824141bcce9b06ce..add00bf99cf7e011aeca23c16de6e4d5f8ed4d3c 100644 (file)
@@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
        if (flags & CMS_USE_KEYID)
                {
                ktri->version = 2;
+               if (env->version < 2)
+                       env->version = 2;
                type = CMS_RECIPINFO_KEYIDENTIFIER;
                }
        else