diff options
Diffstat (limited to 'cadi')
-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 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) { |