From cdeedf52ff5d545fa4d7a1061224e075a3aad1a1 Mon Sep 17 00:00:00 2001 From: Pramod Raghavendra Jayathirth Date: Wed, 3 Oct 2018 11:03:02 -0700 Subject: Adding multithreading support to the application change "thread_count" variable in the CaSignMultThread.java file to control the number of threads created Change-Id: I2296c01d476a7cf18e7fa221d5dd74044cd87293 Issue-ID: AAF-471 Signed-off-by: Pramod Raghavendra Jayathirth --- bin/caservicecontainer/multithreadapplication.sh | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 bin/caservicecontainer/multithreadapplication.sh (limited to 'bin/caservicecontainer/multithreadapplication.sh') diff --git a/bin/caservicecontainer/multithreadapplication.sh b/bin/caservicecontainer/multithreadapplication.sh new file mode 100755 index 0000000..3b3c5de --- /dev/null +++ b/bin/caservicecontainer/multithreadapplication.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# This script takes 4 arguments +key_label=$1 +SoftHSMv2SlotID=$2 +upin=$3 +cert_id=$4 + +# Location to fecth SoftHSM library required by application +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 +# Remove any existing cfg file first from the CWD +rm -f 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}" >> pkcs11.cfg +echo "slot = ${SoftHSMv2SlotID}" >> pkcs11.cfg + +# 2. Compile the Application +# CaSign requires test.csr to be available in CWD +javac CaSignMultiThread.java + +# 3. Run the Application +java CaSignMultiThread ${upin} 0x${cert_id} -- cgit 1.2.3-korg