From 8db4db6563a98c4fac3e833707ab2b14098657d5 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Fri, 22 Nov 2019 10:11:45 +0800 Subject: Support non DOS/Windows format CSAR manifest file When recreating the csar manifest file during signature verification, we should use the same newline charater as the original file instead of using the DOS/Windows newline charater to avoid false positive signature verfication failure. Issue-ID: VNFSDK-520 Signed-off-by: Lianhao Lu Change-Id: I7bdf0a7f6b46c7def0a92d7ec7f245e268355959 --- .../main/java/org/onap/cvc/csar/parser/ManifestFileModel.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'csarvalidation/src/main/java/org/onap/cvc/csar/parser/ManifestFileModel.java') diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/parser/ManifestFileModel.java b/csarvalidation/src/main/java/org/onap/cvc/csar/parser/ManifestFileModel.java index f6b42fd..ee7ade9 100644 --- a/csarvalidation/src/main/java/org/onap/cvc/csar/parser/ManifestFileModel.java +++ b/csarvalidation/src/main/java/org/onap/cvc/csar/parser/ManifestFileModel.java @@ -23,10 +23,16 @@ import java.util.List; public class ManifestFileModel { private final List data; private final List cms; + private final String newLine; public ManifestFileModel(List data, List cms) { + this(data, cms, "\n"); + } + + public ManifestFileModel(List data, List cms, String newLine) { this.data = data; this.cms = cms; + this.newLine = newLine; } public List getData() { @@ -36,4 +42,8 @@ public class ManifestFileModel { public List getCMS() { return Collections.unmodifiableList(cms); } + + public String getNewLine() { + return newLine; + } } -- cgit 1.2.3-korg