In addition to @Bruno's answer, you need to supply the -name
for alias, otherwise Tomcat will throw Alias name tomcat does not identify a key entry
error
Sample Command:
openssl pkcs12 -export -in localhost.crt -inkey localhost.key -out localhost.p12 -name localhost