I am facing issue setting up SSL certificate for tomcat. I will explain explain below the steps I followed
- I have purchased a wild card SSL certificate from GoDaddy, My domain is hosted on 123reg.co.uk so I have generated a CSR following this guide
- Godaddy asked to verify my domain asked me to add a TXT record in my DNS setting. I have added a DNS entry with
@
andvalue
they provided - I have got SSL certificates files from GoDaddy, ref link
gd_bundle-g2-g1.crt
(root certificate)gdig2.crt.pem
(intermediate certificate)a20b537a8b66f79f.crt
(my site certificate)
- I have setup SSL certificate in tomcat following this guide. Executed following command
keytool -import -alias root -keystore tomcat.keystore -trustcacerts file gd_bundle-g2-g1.crt
keytool -import -alias intermed -keystore tomcat.keystore -trustcacerts -file gdig2.crt.pem
keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file a20b537a8b66f79f.crt
- Update the server.xml by adding section, ref link
Connector port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="/home/dds/dont_remove_ssl/tomcat.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS"/>
- I have verified certificate import by this command
keytool -list -keystore /home/dds/dont_remove_ssl/tomcat.keystore
and here is the outputroot, Nov 9, 2017, trustedCertEntry, Certificate fingerprint (SHA1): 27:AC:93:69:FA:F2:52:07:BB:26:27:CE:FA:CC:BE:4E:F9:C3:19:B8
tomcat, Nov 9, 2017, trustedCertEntry, Certificate fingerprint (SHA1): D1:1B:39:38:53:40:AE:DC:7B:06:FC:A2:72:9F:3C:60:68:0B:BB:D5
. This seems to be a problem as this entry must be of typePrivateKeyEntry
which is not the caseintermed, Nov 9, 2017, trustedCertEntry, Certificate fingerprint (SHA1): 27:AC:93:69:FA:F2:52:07:BB:26:27:CE:FA:CC:BE:4E:F9:C3:19:B8
Update my app
web.xml
to enable SSL on my application<security-constraint> <web-resource-collection> <web-resource-name>DDS</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
But this configuration is not working. I am getting error ssl_error_no_cypher_overlap
Following stackoverflow posts are relevant to this issue I am facing. But solution mentioned in them to remove -trustcacerts
flag does not solves my problem