aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pnf-onboarding/pom.xml
diff options
context:
space:
mode:
authorSzabolcs Hutvagner <szabolcs.hutvagner@ericsson.com>2019-04-17 14:07:00 +0100
committerSzabolcs Hutvagner <szabolcs.hutvagner@ericsson.com>2019-04-17 14:16:53 +0100
commitc85fd2844bb7fdd2b92505ec89695b8d7e873de5 (patch)
tree9bdae42a1f8ed4a9c9c55802f6b7e7158132faf6 /test/mocks/pnf-onboarding/pom.xml
parentbce23ab2e95908624a11e21c8751d7791e15c4ef (diff)
Provide Sample Signed PNF Package for Integration Test with certificate
inside signature This can be used for integration test of Pre-Onboarding and Onboarding of a PNF package. Issue-ID: INT-1017 Change-Id: I01f6ebdf4498bd3aac028d8ce6fa510287999d65 Signed-off-by: Szabolcs Hutvagner <szabolcs.hutvagner@ericsson.com>
Diffstat (limited to 'test/mocks/pnf-onboarding/pom.xml')
-rw-r--r--test/mocks/pnf-onboarding/pom.xml94
1 files changed, 66 insertions, 28 deletions
diff --git a/test/mocks/pnf-onboarding/pom.xml b/test/mocks/pnf-onboarding/pom.xml
index 7f513eb00..e9b057d6f 100644
--- a/test/mocks/pnf-onboarding/pom.xml
+++ b/test/mocks/pnf-onboarding/pom.xml
@@ -19,6 +19,7 @@
<onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<csar.name>sample-pnf-${version}</csar.name>
<signed.csar.name>sample-signed-pnf-${version}</signed.csar.name>
+ <signed.csar.name.cms.includes.cert>sample-signed-pnf-cms-includes-cert-${version}</signed.csar.name.cms.includes.cert>
</properties>
<build>
@@ -86,15 +87,8 @@
<destinationFile>${project.build.directory}/${csar.name}.csar</destinationFile>
</configuration>
</execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.coderplus.maven.plugins</groupId>
- <artifactId>copy-rename-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
<execution>
- <id>copy-csar-and-cert-to-signed-csar-dir</id>
+ <id>copy-csar-and-cert-to-signed-csar-dirs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
@@ -109,6 +103,10 @@
<sourceFile>${project.build.directory}/${csar.name}.csar</sourceFile>
<destinationFile>${project.build.directory}/signed-csar/${csar.name}.csar</destinationFile>
</fileSet>
+ <fileSet>
+ <sourceFile>${project.build.directory}/${csar.name}.csar</sourceFile>
+ <destinationFile>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.csar</destinationFile>
+ </fileSet>
</fileSets>
</configuration>
</execution>
@@ -117,7 +115,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.3.2</version> <!-- Check version -->
+ <version>1.3.2</version>
<executions>
<execution>
<id>generate-signature</id>
@@ -125,27 +123,52 @@
<goals>
<goal>exec</goal>
</goals>
+ <configuration>
+ <executable>openssl</executable>
+ <arguments>
+ <argument>cms</argument>
+ <argument>-sign</argument>
+ <argument>-binary</argument>
+ <argument>-nocerts</argument>
+ <argument>-outform</argument>
+ <argument>pem</argument>
+ <argument>-signer</argument>
+ <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
+ <argument>-inkey</argument>
+ <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
+ <argument>-in</argument>
+ <argument>${project.build.directory}/signed-csar/${csar.name}.csar</argument>
+ <argument>-out</argument>
+ <argument>${project.build.directory}/signed-csar/${csar.name}.cms</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-signature-cms-includes-cert</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>openssl</executable>
+ <arguments>
+ <argument>cms</argument>
+ <argument>-sign</argument>
+ <argument>-binary</argument>
+ <argument>-outform</argument>
+ <argument>pem</argument>
+ <argument>-signer</argument>
+ <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
+ <argument>-inkey</argument>
+ <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
+ <argument>-in</argument>
+ <argument>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.csar</argument>
+ <argument>-out</argument>
+ <argument>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.cms</argument>
+ </arguments>
+ </configuration>
</execution>
</executions>
- <configuration>
- <executable>openssl</executable>
- <arguments>
- <argument>cms</argument>
- <argument>-sign</argument>
- <argument>-binary</argument>
- <argument>-nocerts</argument>
- <argument>-outform</argument>
- <argument>pem</argument>
- <argument>-signer</argument>
- <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
- <argument>-inkey</argument>
- <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
- <argument>-in</argument>
- <argument>${project.build.directory}/signed-csar/${csar.name}.csar</argument>
- <argument>-out</argument>
- <argument>${project.build.directory}/signed-csar/${csar.name}.cms</argument>
- </arguments>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -166,6 +189,21 @@
</descriptors>
</configuration>
</execution>
+ <execution>
+ <id>make-signed-csar-zip-file-cms-includes-cert</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${signed.csar.name.cms.includes.cert}</finalName>
+ <attach>false</attach>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/assembly/signedZipCmsIncludesCert.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>