From a69497464641bd919d6c778842e22387de49a22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jairo=20Grater=C3=B3n?= <58091322+jgrateron@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:48:39 -0400 Subject: [PATCH] add oid 2.5.4.13(DESCRIPTION) for DN (#508) --- .../java/org/kse/gui/dnchooser/OidDisplayNameMapping.java | 5 ++++- .../resources/org/kse/gui/dnchooser/resources.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kse/src/main/java/org/kse/gui/dnchooser/OidDisplayNameMapping.java b/kse/src/main/java/org/kse/gui/dnchooser/OidDisplayNameMapping.java index d45802acb..4f69d5b70 100644 --- a/kse/src/main/java/org/kse/gui/dnchooser/OidDisplayNameMapping.java +++ b/kse/src/main/java/org/kse/gui/dnchooser/OidDisplayNameMapping.java @@ -53,6 +53,7 @@ public class OidDisplayNameMapping { private static final String DN_QUALIFIER = res.getString("DistinguishedNameChooser.jlDnQualifier.text"); private static final String GENERATION = res.getString("DistinguishedNameChooser.jlGeneration.text"); private static final String ORG_ID = res.getString("DistinguishedNameChooser.jlOrganizationIdentifier.text"); + private static final String DESCRIPTION = res.getString("DistinguishedNameChooser.jlDescription.text"); private static Map displayNameToOID = new HashMap<>(); @@ -79,6 +80,7 @@ public class OidDisplayNameMapping { displayNameToOID.put(DN_QUALIFIER, BCStyle.DN_QUALIFIER); displayNameToOID.put(GENERATION, BCStyle.GENERATION); displayNameToOID.put(ORG_ID, BCStyle.ORGANIZATION_IDENTIFIER); + displayNameToOID.put(DESCRIPTION, BCStyle.DESCRIPTION); } private static Map oidToDisplayName = new HashMap<>(); @@ -106,11 +108,12 @@ public class OidDisplayNameMapping { oidToDisplayName.put(BCStyle.DN_QUALIFIER.getId(), DN_QUALIFIER); oidToDisplayName.put(BCStyle.GENERATION.getId(), GENERATION); oidToDisplayName.put(BCStyle.ORGANIZATION_IDENTIFIER.getId(), ORG_ID); + oidToDisplayName.put(BCStyle.DESCRIPTION.getId(), DESCRIPTION); } public static String[] getDisplayNames() { return new String[] { CN, OU, O, L, ST, C, E, SN, GIVENNAME, SURNAME, DC, UID, NAME, STREET, TITLE, INITIALS, - PSEUDONYM, DN_QUALIFIER, GENERATION, ORG_ID }; + PSEUDONYM, DN_QUALIFIER, GENERATION, ORG_ID, DESCRIPTION }; } public static ASN1ObjectIdentifier getOidForDisplayName(String displayName) { diff --git a/kse/src/main/resources/org/kse/gui/dnchooser/resources.properties b/kse/src/main/resources/org/kse/gui/dnchooser/resources.properties index 593860781..9bcc50829 100644 --- a/kse/src/main/resources/org/kse/gui/dnchooser/resources.properties +++ b/kse/src/main/resources/org/kse/gui/dnchooser/resources.properties @@ -19,4 +19,4 @@ DistinguishedNameChooser.jlPseudonym.text = Pseudonym (PSEUDONYM DistinguishedNameChooser.jlDnQualifier.text = DN Qualifier (DN_QUALIFIER): DistinguishedNameChooser.jlGeneration.text = Generation (GENERATION): DistinguishedNameChooser.jlOrganizationIdentifier.text = Organization Identifier (ORG_ID): - +DistinguishedNameChooser.jlDescription.text = Description (DESCRIPTION):