Blame SOURCES/openssl-1.0.2k-req-x509.patch
|
|
cfec1a |
diff -up openssl-1.0.2k/apps/req.c.req-x509 openssl-1.0.2k/apps/req.c
|
|
|
cfec1a |
--- openssl-1.0.2k/apps/req.c.req-x509 2017-03-09 17:59:26.269231647 +0100
|
|
|
cfec1a |
+++ openssl-1.0.2k/apps/req.c 2017-05-17 13:23:31.236556216 +0200
|
|
|
cfec1a |
@@ -331,7 +331,6 @@ int MAIN(int argc, char **argv)
|
|
|
cfec1a |
else if (strcmp(*argv, "-text") == 0)
|
|
|
cfec1a |
text = 1;
|
|
|
cfec1a |
else if (strcmp(*argv, "-x509") == 0) {
|
|
|
cfec1a |
- newreq = 1;
|
|
|
cfec1a |
x509 = 1;
|
|
|
cfec1a |
} else if (strcmp(*argv, "-asn1-kludge") == 0)
|
|
|
cfec1a |
kludge = 1;
|
|
|
cfec1a |
@@ -447,6 +446,9 @@ int MAIN(int argc, char **argv)
|
|
|
cfec1a |
goto end;
|
|
|
cfec1a |
}
|
|
|
cfec1a |
|
|
|
cfec1a |
+ if (x509 && infile == NULL)
|
|
|
cfec1a |
+ newreq = 1;
|
|
|
cfec1a |
+
|
|
|
cfec1a |
ERR_load_crypto_strings();
|
|
|
cfec1a |
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
|
|
cfec1a |
BIO_printf(bio_err, "Error getting passwords\n");
|
|
|
cfec1a |
@@ -753,7 +755,7 @@ int MAIN(int argc, char **argv)
|
|
|
cfec1a |
}
|
|
|
cfec1a |
}
|
|
|
cfec1a |
|
|
|
cfec1a |
- if (newreq) {
|
|
|
cfec1a |
+ if (newreq || x509) {
|
|
|
cfec1a |
if (pkey == NULL) {
|
|
|
cfec1a |
BIO_printf(bio_err, "you need to specify a private key\n");
|
|
|
cfec1a |
goto end;
|