break;
case OPT_X509:
x509 = 1;
- newreq = 1;
break;
case OPT_DAYS:
days = atoi(opt_arg());
if (argc != 0)
goto opthelp;
+ if (x509 && infile == NULL)
+ newreq = 1;
+
if (!nmflag_set)
nmflag = XN_FLAG_ONELINE;
}
}
- if (newreq) {
+ if (newreq || x509) {
if (pkey == NULL) {
BIO_printf(bio_err, "you need to specify a private key\n");
goto end;
}
if ((n_max >= 0) && (len > n_max)) {
BIO_printf(bio_err,
- "string is too long, it needs to be less than %d bytes long\n",
+ "string is too long, it needs to be no more than %d bytes long\n",
n_max);
return (0);
}