From bc20b958399bec2b05637bc8c9fedddccffc9267 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 4 Jul 2022 18:48:49 +0200 Subject: [PATCH] Make trust-root constant in SpecialNames --- pgp-cert-d-java/src/main/java/pgp/cert_d/SpecialNames.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pgp-cert-d-java/src/main/java/pgp/cert_d/SpecialNames.java b/pgp-cert-d-java/src/main/java/pgp/cert_d/SpecialNames.java index 682d834..622b2de 100644 --- a/pgp-cert-d-java/src/main/java/pgp/cert_d/SpecialNames.java +++ b/pgp-cert-d-java/src/main/java/pgp/cert_d/SpecialNames.java @@ -9,11 +9,14 @@ import java.util.Map; public class SpecialNames { + public static final String TRUST_ROOT = "trust-root"; + + // Map to allow for potentially upper- and lowercase variants of the same special name private static final Map SPECIAL_NAMES = new HashMap<>(); static { - SPECIAL_NAMES.put("TRUST-ROOT", "trust-root"); // TODO: Remove - SPECIAL_NAMES.put("trust-root", "trust-root"); + SPECIAL_NAMES.put("TRUST-ROOT", TRUST_ROOT); // TODO: Remove + SPECIAL_NAMES.put(TRUST_ROOT, TRUST_ROOT); } public static String lookupSpecialName(String specialName) {