[openssl-commits] [openssl] master update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Mon Mar 26 13:12:15 UTC 2018


The branch master has been updated
       via  2d1b5717b9fd3ed54b663334e18c006d34776328 (commit)
      from  5281435258b5d8201a00b4a9781bb724d99630f0 (commit)


- Log -----------------------------------------------------------------
commit 2d1b5717b9fd3ed54b663334e18c006d34776328
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Sun Mar 25 14:00:33 2018 +0200

    Previously this x509 command line was working, restore that
    
    openssl x509 -in server.pem -signkey privkey.pem -out server.pem
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5746)

-----------------------------------------------------------------------

Summary of changes:
 apps/x509.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/apps/x509.c b/apps/x509.c
index 1bb9cef..1136642 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -467,10 +467,6 @@ int x509_main(int argc, char **argv)
         goto opthelp;
     }
 
-    out = bio_open_default(outfile, 'w', outformat);
-    if (out == NULL)
-        goto end;
-
     if (!app_passwd(passinarg, NULL, &passin, NULL)) {
         BIO_printf(bio_err, "Error getting password\n");
         goto end;
@@ -596,10 +592,12 @@ int x509_main(int argc, char **argv)
             goto end;
     }
 
-    if (!noout || text || next_serial) {
-        OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3");
+    out = bio_open_default(outfile, 'w', outformat);
+    if (out == NULL)
+        goto end;
 
-    }
+    if (!noout || text || next_serial)
+        OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3");
 
     if (alias)
         X509_alias_set1(x, (unsigned char *)alias, -1);


More information about the openssl-commits mailing list