Skip to content

Instantly share code, notes, and snippets.

View chiemerieezechukwu's full-sized avatar
🎯
Focusing

Chiemerie Ezechukwu chiemerieezechukwu

🎯
Focusing
View GitHub Profile

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

Convert keystore to p12 file

keytool -importkeystore -srckeystore truststore.jks -destkeystore truststore.p12 -srcstoretype JKS -deststoretype PKCS12