How to generate .key and .crt file from JKS file for httpd apache server

From https://serverfault.com/questions/715827/how-to-generate-key-and-crt-file-from-jks-file-for-httpd-apache-server

How to generate .key and .crt file from JKS file for httpd apache server


Here is what I do,

First export the key (on windows with a jdk):

keytool -importkeystore -srckeystore mycert.jks -destkeystore keystore.p12 -deststoretype PKCS12

For apache ssl certificate file you need certificate only (using cygwin):

openssl pkcs12 -in keystore.p12 -nokeys -out my_key_store.crt

For ssl key file you need only keys (using cygwin):

openssl pkcs12 -in keystore.p12 -nocerts -nodes -out my_store.key

Comments

Popular posts from this blog

Add GitHub Repository to DBeaver CE Secured with SSH Protocol

Keyboard Shortcut to "Toggle Line Comments" in DBeaver

DBeaver Shortcuts