[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Fri Dec 8 11:49:25 UTC 2017
The branch master has been updated
via 05de3a5be975b2834fd249005ceb0e886e9f39d1 (commit)
via b1c05a504964a01ca54bd37e11c1ebac0f6fafdc (commit)
from d68a0eaf45f12392065f3cf716a1a2682d55d3ce (commit)
- Log -----------------------------------------------------------------
commit 05de3a5be975b2834fd249005ceb0e886e9f39d1
Author: Paul Yang <yang.yang at baishancloud.com>
Date: Tue Nov 21 23:43:03 2017 +0800
Leave a message in doc to indicate 0 is not acceptable
[to be squashed]
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4767)
commit b1c05a504964a01ca54bd37e11c1ebac0f6fafdc
Author: Paul Yang <yang.yang at baishancloud.com>
Date: Tue Nov 21 22:37:23 2017 +0800
Fix some issues in apps/req
1. the 'ignore -days' warning should not be printed without '-x509'
2. the 'ignore -days' warning should terminate with new-line
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4767)
-----------------------------------------------------------------------
Summary of changes:
apps/req.c | 8 ++++++--
doc/man1/req.pod | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/apps/req.c b/apps/req.c
index 8dcfbce..989a6ad 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -159,7 +159,7 @@ int req_main(int argc, char **argv)
char *template = default_config_file, *keyout = NULL;
const char *keyalg = NULL;
OPTION_CHOICE o;
- int ret = 1, x509 = 0, days = 30, i = 0, newreq = 0, verbose = 0;
+ int ret = 1, x509 = 0, days = 0, i = 0, newreq = 0, verbose = 0;
int pkey_type = -1, private = 0;
int informat = FORMAT_PEM, outformat = FORMAT_PEM, keyform = FORMAT_PEM;
int modulus = 0, multirdn = 0, verify = 0, noout = 0, text = 0;
@@ -334,7 +334,7 @@ int req_main(int argc, char **argv)
goto opthelp;
if (days && !x509)
- BIO_printf(bio_err, "Ignoring -days; not generating a certificate");
+ BIO_printf(bio_err, "Ignoring -days; not generating a certificate\n");
if (x509 && infile == NULL)
newreq = 1;
@@ -617,6 +617,10 @@ int req_main(int argc, char **argv)
if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req)))
goto end;
+ if (days == 0) {
+ /* set default days if it's not specified */
+ days = 30;
+ }
if (!set_cert_times(x509ss, NULL, NULL, days))
goto end;
if (!X509_set_subject_name
diff --git a/doc/man1/req.pod b/doc/man1/req.pod
index d0d471f..5ed90ad 100644
--- a/doc/man1/req.pod
+++ b/doc/man1/req.pod
@@ -247,8 +247,8 @@ to the self signed certificate otherwise new request is created.
=item B<-days n>
When the B<-x509> option is being used this specifies the number of
-days to certify the certificate for, otherwise it is ignored.
-The default is 30 days.
+days to certify the certificate for, otherwise it is ignored. B<n> should
+be a positive integer. The default is 30 days.
=item B<-set_serial n>
More information about the openssl-commits
mailing list