Skip to content

Commit

Permalink
add oid 2.5.4.13(DESCRIPTION) for DN (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrateron authored Aug 6, 2024
1 parent 1ecf0c8 commit a694974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, ASN1ObjectIdentifier> displayNameToOID = new HashMap<>();

Expand All @@ -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<String, String> oidToDisplayName = new HashMap<>();
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):

0 comments on commit a694974

Please sign in to comment.