diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_strex.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c index 5523c22cc4..52e1b7db5d 100644 --- a/src/lib/libcrypto/asn1/a_strex.c +++ b/src/lib/libcrypto/asn1/a_strex.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_strex.c,v 1.37 2025/03/09 15:17:22 tb Exp $ */ | 1 | /* $OpenBSD: a_strex.c,v 1.38 2025/03/19 11:18:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -565,31 +565,6 @@ do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n, int indent, | |||
| 565 | return outlen; | 565 | return outlen; |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | /* NID with SN of 1-2 letters, which X509_NAME_print() historically included. */ | ||
| 569 | static int | ||
| 570 | x509_name_entry_include(const X509_NAME_ENTRY *ne) | ||
| 571 | { | ||
| 572 | int nid; | ||
| 573 | |||
| 574 | if ((nid = OBJ_obj2nid(ne->object)) == NID_undef) | ||
| 575 | return 0; | ||
| 576 | |||
| 577 | switch (nid) { | ||
| 578 | case NID_commonName: | ||
| 579 | case NID_surname: | ||
| 580 | case NID_countryName: | ||
| 581 | case NID_localityName: | ||
| 582 | case NID_stateOrProvinceName: | ||
| 583 | case NID_organizationName: | ||
| 584 | case NID_organizationalUnitName: | ||
| 585 | case NID_givenName: | ||
| 586 | case NID_domainComponent: /* XXX - doesn't really belong here */ | ||
| 587 | return 1; | ||
| 588 | } | ||
| 589 | |||
| 590 | return 0; | ||
| 591 | } | ||
| 592 | |||
| 593 | static int | 568 | static int |
| 594 | X509_NAME_print(BIO *bio, const X509_NAME *name, int obase) | 569 | X509_NAME_print(BIO *bio, const X509_NAME *name, int obase) |
| 595 | { | 570 | { |
| @@ -607,9 +582,6 @@ X509_NAME_print(BIO *bio, const X509_NAME *name, int obase) | |||
| 607 | for (i = 0; i < sk_X509_NAME_ENTRY_num(name->entries); i++) { | 582 | for (i = 0; i < sk_X509_NAME_ENTRY_num(name->entries); i++) { |
| 608 | ne = sk_X509_NAME_ENTRY_value(name->entries, i); | 583 | ne = sk_X509_NAME_ENTRY_value(name->entries, i); |
| 609 | 584 | ||
| 610 | if (!x509_name_entry_include(ne)) | ||
| 611 | continue; | ||
| 612 | |||
| 613 | if (started) { | 585 | if (started) { |
| 614 | if (!CBB_add_u8(&cbb, ',')) | 586 | if (!CBB_add_u8(&cbb, ',')) |
| 615 | goto err; | 587 | goto err; |
