I'm trying to create a truststore from StartSSL certificates to enable http2 in Wildfly 10.
So far I have tried this script and the instructions in this link.
So I executed the commands below:
wget http://www.startssl.com/certs/ca.cr
keytool -import -trustcacerts -keystore truststore -alias startcom.ca -file ca.crt
wget http://www.startssl.com/certs/sub.class1.server.ca.crt
keytool -import -trustcacerts -keystore truststore -alias startcom.ca.sub.class1 -file sub.class1.server.ca.crt
The first keytool command works ok, but I get get the following error in the last command:
keytool error: java.lang.Exception: Input not an X.509 certificate
Anyone have any idea what I'm doing wrong?
Answer - These are the correct files:
wget http://www.startssl.com/certs/ca.cr
keytool -import -trustcacerts -keystore truststore -alias startcom.ca -file ca.crt
wget https://www.startssl.com/certs/ca-g2.crt
keytool -import -trustcacerts -keystore truststore -alias startcom.ca-g2 -file ca-g2.crt
wget https://www.startssl.com/certs/ca-sha2.crt
keytool -import -trustcacerts -keystore truststore -alias startcom.ca-sha2 -file ca-sha2.crt