From baea56e2de52d32c77bb19299e631165be53c9c8 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 6 Apr 2018 17:26:56 -0500 Subject: Fix Cassandra Access CM,OAuth Issue-ID: AAF-219 Change-Id: I835a9bb813832a6df4ee804c551d46bfe5307ad0 Signed-off-by: Instrumental --- auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java | 1 + .../auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/RDN.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'auth/auth-certman/src/main/java/org/onap') diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java index 00b0b378..c90dcccf 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java @@ -78,6 +78,7 @@ public abstract class CA { if(fields==null) { throw new CertException(tag + MUST_EXIST_TO_CREATE_CSRS_FOR + caName); } + access.log(Level.INFO, tag, "=",fields); for(RDN rdn : rdns = RDN.parse('/',fields)) { if(rdn.aoi==BCStyle.EmailAddress) { // Cert Specs say Emails belong in Subject throw new CertException("email address is not allowed in " + CM_CA_BASE_SUBJECT); 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 7d4161f2..5b55f1ca 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 @@ -52,7 +52,7 @@ public class RDN { case "generationQualifier": aoi = BCStyle.GENERATION; break; case "serialNumber": aoi = BCStyle.SERIALNUMBER; break; default: - throw new CertException("Unknown ASN1ObjectIdentifier for " + tv[0]); + throw new CertException("Unknown ASN1ObjectIdentifier for " + tv[0] + " in " + tagValue); } tag = tv[0]; value = tv[1]; @@ -81,8 +81,10 @@ public class RDN { if('"' == c) { inQuotes=true; } else if(delim==c) { - lrnd.add(new RDN(sb.toString())); - sb.setLength(0); + if(sb.length()>0) { + lrnd.add(new RDN(sb.toString())); + sb.setLength(0); + } } else { sb.append(dnString.charAt(i)); } -- cgit 1.2.3-korg