2022-03-01 15:19:01 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
package pgp.cert_d;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
public class SpecialNames {
|
|
|
|
|
2022-07-04 18:48:49 +02:00
|
|
|
public static final String TRUST_ROOT = "trust-root";
|
|
|
|
|
|
|
|
// Map to allow for potentially upper- and lowercase variants of the same special name
|
2022-03-01 15:19:01 +01:00
|
|
|
private static final Map<String, String> SPECIAL_NAMES = new HashMap<>();
|
|
|
|
|
|
|
|
static {
|
2022-07-04 18:48:49 +02:00
|
|
|
SPECIAL_NAMES.put("TRUST-ROOT", TRUST_ROOT); // TODO: Remove
|
|
|
|
SPECIAL_NAMES.put(TRUST_ROOT, TRUST_ROOT);
|
2022-03-01 15:19:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public static String lookupSpecialName(String specialName) {
|
|
|
|
return SPECIAL_NAMES.get(specialName);
|
|
|
|
}
|
|
|
|
}
|