Warn if -days without -x509
authorRich Salz <rsalz@openssl.org>
Tue, 7 Nov 2017 12:04:21 +0000 (07:04 -0500)
committerRich Salz <rsalz@openssl.org>
Tue, 7 Nov 2017 12:30:31 +0000 (07:30 -0500)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4692)

apps/req.c
doc/man1/req.pod

index dab67a05345475767f06d22a843e8ec83962b5f3..79425e59393809e9de64178342f00ea5c284f1d5 100644 (file)
@@ -333,6 +333,8 @@ int req_main(int argc, char **argv)
     if (argc != 0)
         goto opthelp;
 
+    if (days && !x509)
+        BIO_printf(bio_err, "Ignoring -days; not generating a certificate");
     if (x509 && infile == NULL)
         newreq = 1;
 
index 7a490983d58fcd38fe9ca6f06067c933828c029b..d0d471f11fb440512305ca66c2a8820f7eb91447 100644 (file)
@@ -247,7 +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. The default is 30 days.
+days to certify the certificate for, otherwise it is ignored.
+The default is 30 days.
 
 =item B<-set_serial n>