summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2025-04-14 08:39:27 +0000
committertb <>2025-04-14 08:39:27 +0000
commitd4b9d4efe55dbdce0f489f6c2617761f8ef29068 (patch)
treedc28ee6d15c896637f6f4f91baebe6ef6bb50537 /src
parent2f02529bd535d07dafdda416d3a4e20587d17868 (diff)
downloadopenbsd-d4b9d4efe55dbdce0f489f6c2617761f8ef29068.tar.gz
openbsd-d4b9d4efe55dbdce0f489f6c2617761f8ef29068.tar.bz2
openbsd-d4b9d4efe55dbdce0f489f6c2617761f8ef29068.zip
Remove openssl ca -msie_hack
The nineties called and wanted their garbage back. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/openssl/ca.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/usr.bin/openssl/ca.c b/src/usr.bin/openssl/ca.c
index d69844620d..b644b746b9 100644
--- a/src/usr.bin/openssl/ca.c
+++ b/src/usr.bin/openssl/ca.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ca.c,v 1.61 2025/02/25 09:49:33 tb Exp $ */ 1/* $OpenBSD: ca.c,v 1.62 2025/04/14 08:39:27 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 *
@@ -104,7 +104,6 @@
104#define ENV_POLICY "policy" 104#define ENV_POLICY "policy"
105#define ENV_EXTENSIONS "x509_extensions" 105#define ENV_EXTENSIONS "x509_extensions"
106#define ENV_CRLEXT "crl_extensions" 106#define ENV_CRLEXT "crl_extensions"
107#define ENV_MSIE_HACK "msie_hack"
108#define ENV_NAMEOPT "name_opt" 107#define ENV_NAMEOPT "name_opt"
109#define ENV_CERTOPT "cert_opt" 108#define ENV_CERTOPT "cert_opt"
110#define ENV_EXTCOPY "copy_extensions" 109#define ENV_EXTCOPY "copy_extensions"
@@ -181,7 +180,6 @@ static struct {
181 int keyform; 180 int keyform;
182 char *md; 181 char *md;
183 int multirdn; 182 int multirdn;
184 int msie_hack;
185 int notext; 183 int notext;
186 char *outdir; 184 char *outdir;
187 char *outfile; 185 char *outfile;
@@ -451,11 +449,6 @@ static const struct option ca_options[] = {
451 .opt.arg = &cfg.md, 449 .opt.arg = &cfg.md,
452 }, 450 },
453 { 451 {
454 .name = "msie_hack",
455 .type = OPTION_FLAG,
456 .opt.flag = &cfg.msie_hack,
457 },
458 {
459 .name = "multivalue-rdn", 452 .name = "multivalue-rdn",
460 .desc = "Enable support for multivalued RDNs", 453 .desc = "Enable support for multivalued RDNs",
461 .type = OPTION_FLAG, 454 .type = OPTION_FLAG,
@@ -827,11 +820,6 @@ ca_main(int argc, char **argv)
827 ERR_clear_error(); 820 ERR_clear_error();
828 if ((f != NULL) && ((*f == 'y') || (*f == 'Y'))) 821 if ((f != NULL) && ((*f == 'y') || (*f == 'Y')))
829 cfg.preserve = 1; 822 cfg.preserve = 1;
830 f = NCONF_get_string(conf, BASE_SECTION, ENV_MSIE_HACK);
831 if (f == NULL)
832 ERR_clear_error();
833 if ((f != NULL) && ((*f == 'y') || (*f == 'Y')))
834 cfg.msie_hack = 1;
835 823
836 f = NCONF_get_string(conf, cfg.section, ENV_NAMEOPT); 824 f = NCONF_get_string(conf, cfg.section, ENV_NAMEOPT);
837 825
@@ -1681,7 +1669,7 @@ do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1681 X509_NAME_ENTRY *ne; 1669 X509_NAME_ENTRY *ne;
1682 X509_NAME_ENTRY *tne, *push; 1670 X509_NAME_ENTRY *tne, *push;
1683 EVP_PKEY *pktmp; 1671 EVP_PKEY *pktmp;
1684 int ok = -1, i, j, last, nid; 1672 int ok = -1, i, j, last;
1685 const char *p; 1673 const char *p;
1686 CONF_VALUE *cv; 1674 CONF_VALUE *cv;
1687 OPENSSL_STRING row[DB_NUMBER]; 1675 OPENSSL_STRING row[DB_NUMBER];
@@ -1723,23 +1711,6 @@ do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1723 if (obj == NULL) 1711 if (obj == NULL)
1724 goto err; 1712 goto err;
1725 1713
1726 if (cfg.msie_hack) {
1727 /* assume all type should be strings */
1728 nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(ne));
1729 if (nid == NID_undef)
1730 goto err;
1731
1732 if (str->type == V_ASN1_UNIVERSALSTRING)
1733 ASN1_UNIVERSALSTRING_to_string(str);
1734
1735 if ((str->type == V_ASN1_IA5STRING) &&
1736 (nid != NID_pkcs9_emailAddress))
1737 str->type = V_ASN1_T61STRING;
1738
1739 if ((nid == NID_pkcs9_emailAddress) &&
1740 (str->type == V_ASN1_PRINTABLESTRING))
1741 str->type = V_ASN1_IA5STRING;
1742 }
1743 /* If no EMAIL is wanted in the subject */ 1714 /* If no EMAIL is wanted in the subject */
1744 if ((OBJ_obj2nid(obj) == NID_pkcs9_emailAddress) && (!email_dn)) 1715 if ((OBJ_obj2nid(obj) == NID_pkcs9_emailAddress) && (!email_dn))
1745 continue; 1716 continue;