summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorMaciej Wejs <maciej.wejs@nokia.com>2018-07-12 14:02:19 +0200
committerMaciej Wejs <maciej.wejs@nokia.com>2018-07-12 14:03:21 +0200
commite0d8df565b105237a584ab5ca832fe2d39329231 (patch)
tree3a9d0e20d7e306ff3424bcf2438ae9ae669b5701 /cadi
parent656c303eeb020d0763996a71d8a9705357013eb6 (diff)
System dependent separators
Added handling of system dependent separators in places they currently cause JU fail on non-Unix systems. Change-Id: I7331a76945a90c255805d0a3e39960444a2ee65b Issue-ID: AAF-387 Signed-off-by: Maciej Wejs <maciej.wejs@nokia.com>
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java8
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java3
2 files changed, 7 insertions, 4 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java
index b6aeafe6..92308034 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java
@@ -37,11 +37,13 @@ public class PlaceArtifactOnStream implements PlaceArtifact {
@Override
public boolean place(Trans trans, CertInfo capi, Artifact a, String machine) {
+ String lineSeparator = System.lineSeparator();
+
if(capi.getNotes()!=null && capi.getNotes().length()>0) {
- trans.info().printf("Warning: %s\n",capi.getNotes());
+ trans.info().printf("Warning: %s" + lineSeparator, capi.getNotes());
}
- out.printf("Challenge: %s\n",capi.getChallenge());
- out.printf("PrivateKey:\n%s\n",capi.getPrivatekey());
+ out.printf("Challenge: %s" + lineSeparator, capi.getChallenge());
+ out.printf("PrivateKey:" + lineSeparator + "%s" + lineSeparator, capi.getPrivatekey());
out.println("Certificate Chain:");
for(String c : capi.getCerts()) {
out.println(c);
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java b/cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java
index 4067f160..07652d24 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java
@@ -483,7 +483,8 @@ public class Symm {
switch(read) {
case -1:
case '=':
- case '\n':
+ case '\n':
+ case '\r':
return -1;
}
for(int i=0;i<codec.length;++i) {