[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Aug 24 13:52:05 UTC 2016


The branch master has been updated
       via  efba7787cd0036d667943070265ca8aef59e9d00 (commit)
      from  0a307450bfdd570a09235a7ba16d6c8243bbe275 (commit)


- Log -----------------------------------------------------------------
commit efba7787cd0036d667943070265ca8aef59e9d00
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Aug 24 13:36:07 2016 +0100

    Clarify the error messages in 08f6ae5b28
    
    Ensure it is clear to the user why there has been an error.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

Summary of changes:
 apps/cms.c  | 12 ++++++------
 apps/req.c  |  2 +-
 apps/x509.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/apps/cms.c b/apps/cms.c
index 9c41a97..b9eec24 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -413,8 +413,8 @@ int cms_main(int argc, char **argv)
             break;
         case OPT_SECRETKEY:
             if (secret_key != NULL) {
-                /* Cannot be supplied twice */
-                BIO_printf(bio_err, "Invalid key %s\n", opt_arg());
+                BIO_printf(bio_err, "Invalid key (supplied twice) %s\n",
+                           opt_arg());
                 goto opthelp;
             }
             secret_key = OPENSSL_hexstr2buf(opt_arg(), &ltmp);
@@ -426,8 +426,8 @@ int cms_main(int argc, char **argv)
             break;
         case OPT_SECRETKEYID:
             if (secret_keyid != NULL) {
-                /* Cannot be supplied twice */
-                BIO_printf(bio_err, "Invalid id %s\n", opt_arg());
+                BIO_printf(bio_err, "Invalid id (supplied twice) %s\n",
+                           opt_arg());
                 goto opthelp;
             }
             secret_keyid = OPENSSL_hexstr2buf(opt_arg(), &ltmp);
@@ -442,8 +442,8 @@ int cms_main(int argc, char **argv)
             break;
         case OPT_ECONTENT_TYPE:
             if (econtent_type != NULL) {
-                /* Cannot be supplied twice */
-                BIO_printf(bio_err, "Invalid OID %s\n", opt_arg());
+                BIO_printf(bio_err, "Invalid OID (supplied twice) %s\n",
+                           opt_arg());
                 goto opthelp;
             }
             econtent_type = OBJ_txt2obj(opt_arg(), 0);
diff --git a/apps/req.c b/apps/req.c
index fb37f7d..8ebe1ec 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -296,7 +296,7 @@ int req_main(int argc, char **argv)
             break;
         case OPT_SET_SERIAL:
             if (serial != NULL) {
-                /* Cannot be supplied twice */
+                BIO_printf(bio_err, "Serial number supplied twice\n");
                 goto opthelp;
             }
             serial = s2i_ASN1_INTEGER(NULL, opt_arg());
diff --git a/apps/x509.c b/apps/x509.c
index 9e51012..20db458 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -262,7 +262,7 @@ int x509_main(int argc, char **argv)
             break;
         case OPT_SET_SERIAL:
             if (sno != NULL) {
-                /* Cannot be supplied twice */
+                BIO_printf(bio_err, "Serial number supplied twice\n");
                 goto opthelp;
             }
             if ((sno = s2i_ASN1_INTEGER(NULL, opt_arg())) == NULL)


More information about the openssl-commits mailing list