#!/usr/bin/bash echo GENERATING TEMPORARY KEY PAIRS FOR TESTS rm -r /tmp/keys &> /dev/null mkdir -p /tmp/keys cd /tmp/keys keytool -genkey -noprompt \ -alias key \ -keyalg RSA \ -validity 2 \ -keystore test.keystore \ -storetype PKCS12 \ -dname "CN=x.y.com, OU=TB, O=TBA, L=dzqdz, S=dqzdzq, C=GB" \ -storepass 123456789 \ -keypass 123456789 keytool -noprompt -export \ -alias key \ -keystore test.keystore \ -rfc \ -file public.cert \ -keypass 123456789 \ -storepass 123456789 openssl pkcs12 -in test.keystore -nodes -nocerts -out private.pcks -passin pass:123456789 openssl pkcs12 -in test.keystore -nokeys -out public.cert -passin pass:123456789