Skip to content

Instantly share code, notes, and snippets.

@matthiasbalke
Last active May 19, 2021 09:01
Show Gist options
  • Save matthiasbalke/27f274c6638bc50857fb176e33b371bb to your computer and use it in GitHub Desktop.
Save matthiasbalke/27f274c6638bc50857fb176e33b371bb to your computer and use it in GitHub Desktop.
create Java trust store
#!/bin/bash
# to add a trusted certificate to the trust store
# place the trusted certificate in trusted-certificate.crt
cat intermediate.crt > trusted-certificate.crt
# import the certificate into the existing or create a new pkcs12 container
keytool -import -alias intermediate -file trusted-certificate.crt -keystore trust-store.p12 -storetype PKCS12 -storepass password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment