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:33:32 +0000 (14:33 +0100)
PR#3249

crypto/cms/cms_sd.c

index e8b2e1f889dcb5f2dc2f5e7cb37d9b7611e1e96a..ac5103abf7ccc04b61613697102730dfe440cdd6 100644 (file)
@@ -159,8 +159,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)