Import SSL certificate from web server Apache OpenSSL to Tomcat format

To import SSL certificate into pkcs12 format you can use command:

# openssl pkcs12 -export -in /home/taras/ssl/ -inkey /home/taras/ssl/ -out /home/taras/ssl/ -name tomcat -CAfile /home/taras/ssl/ -caname root -chain
Enter Export Password:
Verifying - Enter Export Password:

You will be prompted to input password.

# keytool -importkeystore -srckeystore /home/taras/ssl/ -srcstoretype PKCS12 -deststoretype JKS -destkeystore /home/taras/ssl/
Enter destination keystore password:  
Re-enter new password: 
Enter source keystore password:  
Entry for alias tomcat successfully imported.
Import command completed:  1 entries successfully imported, 0 entries failed or cancelled

Now, you can use /home/taras/ssl/ certificates storage in your Apache Tomcat SSL virtual host configuration.