From f177d9364a8ac27fd30bb2d08e05367b1e5b33d9 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Wed, 21 Sep 2022 13:11:12 -0700 Subject: [PATCH] Fix for incorrect DN NID and confusion with DC --- src/x509.c | 4 ++-- wolfssl/wolfcrypt/asn.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/x509.c b/src/x509.c index dca91118e..2dfe1517e 100644 --- a/src/x509.c +++ b/src/x509.c @@ -11962,8 +11962,8 @@ static int get_dn_attr_by_nid(int n, const char** buf) str = "initials"; len = 8; break; - case NID_distinguishedName: - str = "DN"; + case NID_domainComponent: + str = "DC"; len = 2; break; default: diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index b2a000751..a2cce5529 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -798,7 +798,6 @@ enum NID_inhibit_any_policy = 168, /* 2.5.29.54 */ NID_tlsfeature = 1020, /* id-pe 24 */ NID_buildingName = 1494, - NID_distinguishedName = 25, NID_dnQualifier = 174, /* 2.5.4.46 */ NID_commonName = 14, /* CN Changed to not conflict