Set version number correctly.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 29 May 2014 13:07:49 +0000 (14:07 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 29 May 2014 13:12:13 +0000 (14:12 +0100)
PR#3249
(cherry picked from commit 8909bf20269035d295743fca559207ef2eb84eb3)

crypto/cms/cms_sd.c

index e3192b9c574194d7a57328cd576e57bc23d115ce..571e1ed96191587a6377d0109d1521c2e67b8d35 100644 (file)
@@ -158,8 +158,8 @@ static void cms_sd_set_version(CMS_SignedData *sd)
                        if (sd->version < 3)
                                sd->version = 3;
                        }
-               else
-                       sd->version = 1;
+               else if (si->version < 1)
+                       si->version = 1;
                }
 
        if (sd->version < 1)