aboutsummaryrefslogtreecommitdiffstats
path: root/bin/caservicecontainer/application.sh
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-09-19 13:40:14 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-09-19 16:52:56 -0700
commit8b2b7295fd3538ee2e46eed1c55bfb256b644dd0 (patch)
tree6d3458e415e355ad2fd6da4ea9edcb38083ff326 /bin/caservicecontainer/application.sh
parentcd713d4de6c3d08478d6f6ca27b0f9e1afd439fe (diff)
Fix bugs in startup script and move scripts to bin
Testing in kubernetes revealed some issues that needed to be fixed. This patch contains those changes. Issue-ID: AAF-510 Change-Id: Ib7956a2d49f4f7f663f18522e71758dffe35bcb0 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'bin/caservicecontainer/application.sh')
-rwxr-xr-xbin/caservicecontainer/application.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/caservicecontainer/application.sh b/bin/caservicecontainer/application.sh
index 1a723ea..a7c864d 100755
--- a/bin/caservicecontainer/application.sh
+++ b/bin/caservicecontainer/application.sh
@@ -11,20 +11,21 @@ applicationlibrary="/usr/local/lib/softhsm/libsofthsm2.so"
# Setting up the java application and running the application
# 1. Create the configuration pkcs11.cfg for the application
-touch /tmp/pkcs11.cfg
-chmod 755 /tmp/pkcs11.cfg
-echo "name = ${key_label}" >> /tmp/pkcs11.cfg
+# Remove any existing cfg file first from the CWD
+rm pkcs11.cfg
+touch pkcs11.cfg
+chmod 755 pkcs11.cfg
+echo "name = ${key_label}" >> pkcs11.cfg
echo "The location of applicationms library is ${applicationlibrary}"
-echo "library = ${applicationlibrary}" >> /tmp/pkcs11.cfg
-echo "slot = ${SoftHSMv2SlotID}" >> /tmp/pkcs11.cfg
+echo "library = ${applicationlibrary}" >> pkcs11.cfg
+echo "slot = ${SoftHSMv2SlotID}" >> pkcs11.cfg
# 2. Compile the Application
-cd /tmp/files
-cp test.csr /tmp/test.csr
+# CaSign requires test.csr to be available in CWD
javac CaSign.java
# 3. Run the Application
java CaSign ${upin} 0x${cert_id}
# 4. Verify the generated certificate
-openssl verify -verbose -CAfile ca.cert /tmp/test.cert \ No newline at end of file
+openssl verify -verbose -CAfile ${DATA_FOLDER}/ca.cert test.cert \ No newline at end of file