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