From 72e2d333317dfc49ad9ec19abc336053ffb68159 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Thu, 25 Feb 2021 17:51:43 +0000 Subject: Fix signature extension of NSD CSAR package The signature of the NSD signed package should have the extension .cms, not .sig.cms. Change-Id: I82d7dcb286da462c289114b1a450a83263652655 Issue-ID: SDC-3489 Signed-off-by: andre.schmid --- .../plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'catalog-be-plugins') diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java index f9e0970ba9..d60411e36a 100644 --- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java +++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java @@ -18,6 +18,7 @@ */ package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator; +import static org.openecomp.sdc.be.plugins.etsi.nfv.nsd.security.NsdCsarEtsiOption2Signer.SIGNATURE_EXTENSION; import static org.openecomp.sdc.common.api.ArtifactTypeEnum.ETSI_PACKAGE; import static org.openecomp.sdc.common.api.ArtifactTypeEnum.ONBOARDED_PACKAGE; @@ -80,7 +81,7 @@ public class EtsiNfvNsdCsarGeneratorImpl implements EtsiNfvNsdCsarGenerator { private static final String MANIFEST_EXT = "mf"; private static final String SLASH = "/"; private static final String DOT = "."; - private static final String SIGNATURE_EXTENSION = ".sig.cms"; + private static final String CSAR_SIGNATURE_EXTENSION = ".cms"; private static final String CSAR_EXTENSION = ".csar"; private static final String DOT_YAML = DOT + "yaml"; private static final String DEFINITION = "Definitions"; @@ -423,7 +424,7 @@ public class EtsiNfvNsdCsarGeneratorImpl implements EtsiNfvNsdCsarGenerator { final ZipOutputStream zip = new ZipOutputStream(out)) { zip.putNextEntry(new ZipEntry(csarFileName + CSAR_EXTENSION)); zip.write(csarPackageBytes); - zip.putNextEntry(new ZipEntry(csarFileName + SIGNATURE_EXTENSION)); + zip.putNextEntry(new ZipEntry(csarFileName + CSAR_SIGNATURE_EXTENSION)); zip.write(signature); final File certificateFile = certificateInfo.getCertificateFile(); zip.putNextEntry(new ZipEntry(csarFileName + "." + FilenameUtils.getExtension(certificateFile.getName()))); -- cgit 1.2.3-korg