summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-14 15:23:32 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-09-14 15:23:44 +0530
commitacfd496667eb43d2429a141a4ae44d7207bbcf43 (patch)
tree7604ff00b6d3d19f41707517c1667337f483bca1 /auth
parent0f7c1d221f16ab3cace0e40a1b14fa75fb9a958c (diff)
RDN.java: Fixed sonar code smells
Sonar link: https://sonar.onap.org/code?id=org.onap.aaf.authz%3Aparent&selected=org.onap.aaf.authz%3Aaaf-auth-certman%3Asrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fcm%2Fcert%2FRDN.java Issue-ID: AAF-496 Change-Id: I2fcbf7e9baf6e8a07baf03e829367468adf770d7 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'auth')
-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);
}