Skip to content

Instantly share code, notes, and snippets.

View eavilesmejia's full-sized avatar
🏠
Working from home

Edgard Aviles eavilesmejia

🏠
Working from home
  • Nicaragua
View GitHub Profile
@thiyagaraj
thiyagaraj / jks-to-pem.md
Last active November 28, 2023 23:48
Convert jks/java keystore and get public and private keys as pem

Convert jks and get public and private keys out:

keytool -importkeystore -srckeystore default.keystore -destkeystore new-store.p12 -deststoretype PKCS12

  • Gives new-store.p12

openssl pkcs12 -in new-store.p12 -nokeys -out public.pem

  • Gives public key as public.pem

openssl pkcs12 -in new-store.p12 -nodes -nocerts -out private.pem

  • Gives private key as private.pem