#!/bin/sh
TRUSTSTORE="truststore.jks"
TRUSTSTORE_PASSWORD="changeit"

echo "Creating an empty truststore..."
keytool -genkeypair -alias dummy -keyalg RSA -keysize 2048 -keystore $TRUSTSTORE -storepass $TRUSTSTORE_PASSWORD -validity 365 -dname "CN=dummy" -keypass $TRUSTSTORE_PASSWORD

# Delete the dummy entry
echo "Removing dummy entry..."
keytool -delete -alias dummy -keystore $TRUSTSTORE -storepass $TRUSTSTORE_PASSWORD
