diff options
author | andre.schmid <andre.schmid@est.tech> | 2021-02-25 17:51:43 +0000 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-02-26 14:42:40 +0000 |
commit | 72e2d333317dfc49ad9ec19abc336053ffb68159 (patch) | |
tree | 53382e1704463464d889d2bdefd6148600e0911e /catalog-be-plugins/etsi-nfv-nsd-csar-plugin | |
parent | 0a254eb756da8407ecf3aabc6dc15013aeb7f9be (diff) |
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 <andre.schmid@est.tech>
Diffstat (limited to 'catalog-be-plugins/etsi-nfv-nsd-csar-plugin')
-rw-r--r-- | catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
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()))); |