aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/CSRMeta.java2
-rw-r--r--certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/RDN.java33
2 files changed, 16 insertions, 19 deletions
diff --git a/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/CSRMeta.java b/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/CSRMeta.java
index de11b5bb..aa9748f9 100644
--- a/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/CSRMeta.java
+++ b/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/CSRMeta.java
@@ -67,7 +67,7 @@ public class CSRMeta {
}
}
for (RDN rdn : rdns) {
- xnb.addRDN(rdn.aoi, rdn.value);
+ xnb.addRDN(rdn.getAoi(), rdn.getValue());
}
name = xnb.build();
}
diff --git a/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/RDN.java b/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/RDN.java
index 69445b2e..0e1ab25f 100644
--- a/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/RDN.java
+++ b/certService/src/main/java/org/onap/aaf/certservice/cmpv2client/external/RDN.java
@@ -1,4 +1,4 @@
-/**
+/*
* ============LICENSE_START====================================================
* org.onap.aaf
* ===========================================================================
@@ -30,54 +30,51 @@ import org.bouncycastle.cert.CertException;
public class RDN {
- public String tag;
- public String value;
- public ASN1ObjectIdentifier aoi;
+ private String tag;
+ private String value;
+ private ASN1ObjectIdentifier aoi;
+
+ public String getValue() {
+ return value;
+ }
+
+ public ASN1ObjectIdentifier getAoi() {
+ return aoi;
+ }
public RDN(final String tagValue) throws CertException {
String[] tv = Split.splitTrim('=', tagValue);
- switch (tv[0]) {
+ switch (tv[0].toLowerCase()) {
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
+ break;
case "email":
- case "EMAIL":
- case "E":
+ case "e":
case "emailaddress":
- case "EMAILADDRESS":
aoi = BCStyle.EmailAddress;
break; // should be SAN extension
case "initials":