diff options
author | Jonathan Gathman <jonathan.gathman@att.com> | 2018-07-20 21:50:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-07-20 21:50:37 +0000 |
commit | 5a081a25fd94da790a59a68195a19bc0ef7aa20c (patch) | |
tree | 062560d7480851b59a4ae5b2568c055cc67f5976 | |
parent | 5c5359b01df034f488d6eac8b45a4c890cce5d6a (diff) | |
parent | e0d8df565b105237a584ab5ca832fe2d39329231 (diff) |
Merge "System dependent separators"
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactOnStream.java | 8 | ||||
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/Symm.java | 3 |
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 04743b85..afc1d979 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) { |