diff options
-rw-r--r-- | src/usr.bin/openssl/openssl.1 | 12 | ||||
-rw-r--r-- | src/usr.bin/openssl/req.c | 28 |
2 files changed, 5 insertions, 35 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index 5f7f2394f7..05f7e21cc9 100644 --- a/src/usr.bin/openssl/openssl.1 +++ b/src/usr.bin/openssl/openssl.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: openssl.1,v 1.132 2021/09/05 06:16:30 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.133 2021/10/23 11:36:44 tb Exp $ |
2 | .\" ==================================================================== | 2 | .\" ==================================================================== |
3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -110,7 +110,7 @@ | |||
110 | .\" copied and put under another distribution licence | 110 | .\" copied and put under another distribution licence |
111 | .\" [including the GNU Public Licence.] | 111 | .\" [including the GNU Public Licence.] |
112 | .\" | 112 | .\" |
113 | .Dd $Mdocdate: September 5 2021 $ | 113 | .Dd $Mdocdate: October 23 2021 $ |
114 | .Dt OPENSSL 1 | 114 | .Dt OPENSSL 1 |
115 | .Os | 115 | .Os |
116 | .Sh NAME | 116 | .Sh NAME |
@@ -3649,7 +3649,6 @@ or standard output if not specified. | |||
3649 | .It Nm openssl req | 3649 | .It Nm openssl req |
3650 | .Bk -words | 3650 | .Bk -words |
3651 | .Op Fl addext Ar ext | 3651 | .Op Fl addext Ar ext |
3652 | .Op Fl asn1-kludge | ||
3653 | .Op Fl batch | 3652 | .Op Fl batch |
3654 | .Op Fl config Ar file | 3653 | .Op Fl config Ar file |
3655 | .Op Fl days Ar n | 3654 | .Op Fl days Ar n |
@@ -3666,7 +3665,6 @@ or standard output if not specified. | |||
3666 | .Op Fl new | 3665 | .Op Fl new |
3667 | .Op Fl newhdr | 3666 | .Op Fl newhdr |
3668 | .Op Fl newkey Ar arg | 3667 | .Op Fl newkey Ar arg |
3669 | .Op Fl no-asn1-kludge | ||
3670 | .Op Fl nodes | 3668 | .Op Fl nodes |
3671 | .Op Fl noout | 3669 | .Op Fl noout |
3672 | .Op Fl out Ar file | 3670 | .Op Fl out Ar file |
@@ -3705,9 +3703,6 @@ option is present) or certificate request. | |||
3705 | The argument must have the form of a key=value pair as it would appear in a | 3703 | The argument must have the form of a key=value pair as it would appear in a |
3706 | config file. | 3704 | config file. |
3707 | This option can be given multiple times. | 3705 | This option can be given multiple times. |
3708 | .It Fl asn1-kludge | ||
3709 | Produce requests in an invalid format for certain picky CAs. | ||
3710 | Very few CAs still require the use of this option. | ||
3711 | .It Fl batch | 3706 | .It Fl batch |
3712 | Non-interactive mode. | 3707 | Non-interactive mode. |
3713 | .It Fl config Ar file | 3708 | .It Fl config Ar file |
@@ -3819,9 +3814,6 @@ can be omitted, | |||
3819 | in which case any parameters can be specified via the | 3814 | in which case any parameters can be specified via the |
3820 | .Fl pkeyopt | 3815 | .Fl pkeyopt |
3821 | option. | 3816 | option. |
3822 | .It Fl no-asn1-kludge | ||
3823 | Reverse the effect of | ||
3824 | .Fl asn1-kludge . | ||
3825 | .It Fl nodes | 3817 | .It Fl nodes |
3826 | Do not encrypt the private key. | 3818 | Do not encrypt the private key. |
3827 | .It Fl noout | 3819 | .It Fl noout |
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c index aaf3dceb30..4ab091a097 100644 --- a/src/usr.bin/openssl/req.c +++ b/src/usr.bin/openssl/req.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: req.c,v 1.20 2021/10/22 09:44:30 tb Exp $ */ | 1 | /* $OpenBSD: req.c,v 1.21 2021/10/23 11:36:44 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -143,7 +143,6 @@ struct { | |||
143 | char *keyfile; | 143 | char *keyfile; |
144 | int keyform; | 144 | int keyform; |
145 | char *keyout; | 145 | char *keyout; |
146 | int kludge; | ||
147 | int modulus; | 146 | int modulus; |
148 | int multirdn; | 147 | int multirdn; |
149 | int newhdr; | 148 | int newhdr; |
@@ -296,12 +295,6 @@ static const struct option req_options[] = { | |||
296 | .opt.argfunc = req_opt_addext, | 295 | .opt.argfunc = req_opt_addext, |
297 | }, | 296 | }, |
298 | { | 297 | { |
299 | .name = "asn1-kludge", | ||
300 | .type = OPTION_VALUE, | ||
301 | .opt.value = &req_config.kludge, | ||
302 | .value = 1, | ||
303 | }, | ||
304 | { | ||
305 | .name = "batch", | 298 | .name = "batch", |
306 | .desc = "Operate in batch mode", | 299 | .desc = "Operate in batch mode", |
307 | .type = OPTION_FLAG, | 300 | .type = OPTION_FLAG, |
@@ -402,12 +395,6 @@ static const struct option req_options[] = { | |||
402 | .opt.argfunc = req_opt_newkey, | 395 | .opt.argfunc = req_opt_newkey, |
403 | }, | 396 | }, |
404 | { | 397 | { |
405 | .name = "no-asn1-kludge", | ||
406 | .type = OPTION_VALUE, | ||
407 | .opt.value = &req_config.kludge, | ||
408 | .value = 0, | ||
409 | }, | ||
410 | { | ||
411 | .name = "nodes", | 398 | .name = "nodes", |
412 | .desc = "Do not encrypt output private key", | 399 | .desc = "Do not encrypt output private key", |
413 | .type = OPTION_FLAG, | 400 | .type = OPTION_FLAG, |
@@ -544,12 +531,12 @@ static void | |||
544 | req_usage(void) | 531 | req_usage(void) |
545 | { | 532 | { |
546 | fprintf(stderr, | 533 | fprintf(stderr, |
547 | "usage: req [-addext ext] [-asn1-kludge] [-batch] [-config file]\n" | 534 | "usage: req [-addext ext] [-batch] [-config file]\n" |
548 | " [-days n] [-extensions section] [-in file]\n" | 535 | " [-days n] [-extensions section] [-in file]\n" |
549 | " [-inform der | pem] [-key keyfile] [-keyform der | pem]\n" | 536 | " [-inform der | pem] [-key keyfile] [-keyform der | pem]\n" |
550 | " [-keyout file] [-md4 | -md5 | -sha1] [-modulus]\n" | 537 | " [-keyout file] [-md4 | -md5 | -sha1] [-modulus]\n" |
551 | " [-multivalue-rdn] [-nameopt option] [-new] [-newhdr]\n" | 538 | " [-multivalue-rdn] [-nameopt option] [-new] [-newhdr]\n" |
552 | " [-newkey arg] [-no-asn1-kludge] [-nodes] [-noout]\n" | 539 | " [-newkey arg] [-nodes] [-noout]\n" |
553 | " [-out file] [-outform der | pem] [-passin arg]\n" | 540 | " [-out file] [-outform der | pem] [-passin arg]\n" |
554 | " [-passout arg] [-pkeyopt opt:value] [-pubkey]\n" | 541 | " [-passout arg] [-pkeyopt opt:value] [-pubkey]\n" |
555 | " [-reqexts section] [-reqopt option] [-set_serial n]\n" | 542 | " [-reqexts section] [-reqopt option] [-set_serial n]\n" |
@@ -851,11 +838,6 @@ req_main(int argc, char **argv) | |||
851 | BIO_printf(bio_err, "-----\n"); | 838 | BIO_printf(bio_err, "-----\n"); |
852 | } | 839 | } |
853 | if (!req_config.newreq) { | 840 | if (!req_config.newreq) { |
854 | /* | ||
855 | * Since we are using a pre-existing certificate request, the | ||
856 | * kludge 'format' info should not be changed. | ||
857 | */ | ||
858 | req_config.kludge = -1; | ||
859 | if (req_config.infile == NULL) | 841 | if (req_config.infile == NULL) |
860 | BIO_set_fp(in, stdin, BIO_NOCLOSE); | 842 | BIO_set_fp(in, stdin, BIO_NOCLOSE); |
861 | else { | 843 | else { |
@@ -890,10 +872,6 @@ req_main(int argc, char **argv) | |||
890 | } | 872 | } |
891 | i = make_REQ(req, pkey, req_config.subj, req_config.multirdn, !req_config.x509, req_config.chtype); | 873 | i = make_REQ(req, pkey, req_config.subj, req_config.multirdn, !req_config.x509, req_config.chtype); |
892 | req_config.subj = NULL; /* done processing '-subj' option */ | 874 | req_config.subj = NULL; /* done processing '-subj' option */ |
893 | if ((req_config.kludge > 0) && !sk_X509_ATTRIBUTE_num(req->req_info->attributes)) { | ||
894 | sk_X509_ATTRIBUTE_free(req->req_info->attributes); | ||
895 | req->req_info->attributes = NULL; | ||
896 | } | ||
897 | if (!i) { | 875 | if (!i) { |
898 | BIO_printf(bio_err, "problems making Certificate Request\n"); | 876 | BIO_printf(bio_err, "problems making Certificate Request\n"); |
899 | goto end; | 877 | goto end; |