summaryrefslogtreecommitdiffstats
path: root/auth/auth-certman/src
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2018-09-14 15:28:57 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-14 15:28:57 +0000
commit31724de8ac6df8efd7aca6faed3770112e50e6c4 (patch)
treea94f99e8bf7712767de98f99e939640ad0b2ac5f /auth/auth-certman/src
parent83ef047916a6a4b24bddca61a90f2b8b0a6e091d (diff)
parentacfd496667eb43d2429a141a4ae44d7207bbcf43 (diff)
Merge "RDN.java: Fixed sonar code smells"
Diffstat (limited to 'auth/auth-certman/src')
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java42
1 files changed, 28 insertions, 14 deletions
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java
index f57c837a..fe4e20ff 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java
@@ -35,22 +35,36 @@ public class RDN {
public RDN(final String tagValue) throws CertException {
String[] tv = Split.splitTrim('=',tagValue);
switch(tv[0]) {
- case "cn":case "CN": aoi = BCStyle.CN; break;
- case "c":case "C": aoi = BCStyle.C;break;
- case "st":case "ST": aoi = BCStyle.ST;break;
- case "l":case "L": aoi = BCStyle.L;break;
- case "o":case "O": aoi = BCStyle.O;break;
- case "ou":case "OU": aoi = BCStyle.OU;break;
- case "dc":case "DC": aoi = BCStyle.DC;break;
- case "gn":case "GN": aoi = BCStyle.GIVENNAME; break;
- case "sn":case "SN": aoi = BCStyle.SN; break; // surname
+ case "cn":case "CN": aoi = BCStyle.CN;
+ break;
+ case "c":case "C": aoi = BCStyle.C;
+ break;
+ case "st":case "ST": aoi = BCStyle.ST;
+ break;
+ case "l":case "L": aoi = BCStyle.L;
+ break;
+ case "o":case "O": aoi = BCStyle.O;
+ break;
+ case "ou":case "OU": aoi = BCStyle.OU;
+ break;
+ case "dc":case "DC": aoi = BCStyle.DC;
+ break;
+ case "gn":case "GN": aoi = BCStyle.GIVENNAME;
+ break;
+ case "sn":case "SN": aoi = BCStyle.SN;
+ break; // surname
case "email":case "EMAIL":
case "emailaddress":
- case "EMAILADDRESS": aoi = BCStyle.EmailAddress;break; // should be SAN extension
- case "initials": aoi = BCStyle.INITIALS; break;
- case "pseudonym": aoi = BCStyle.PSEUDONYM; break;
- case "generationQualifier": aoi = BCStyle.GENERATION; break;
- case "serialNumber": aoi = BCStyle.SERIALNUMBER; break;
+ case "EMAILADDRESS": aoi = BCStyle.EmailAddress;
+ break; // should be SAN extension
+ case "initials": aoi = BCStyle.INITIALS;
+ break;
+ case "pseudonym": aoi = BCStyle.PSEUDONYM;
+ break;
+ case "generationQualifier": aoi = BCStyle.GENERATION;
+ break;
+ case "serialNumber": aoi = BCStyle.SERIALNUMBER;
+ break;
default:
throw new CertException("Unknown ASN1ObjectIdentifier for " + tv[0] + " in " + tagValue);
}