I can't get my certificate bought from RapidSSL working on Tomcat but on Apache.
RapidSSL requires that you install 2 intermediate ca files.
When I create a keystore from the private key, certificate and the intermediary CA:s I can see
Entry type: PrivateKeyEntry
Certificate chain length: 1
The two intermediate certificates does not seem to be picked up or something like that.
I have
- private key
- the certificate
- the primary and secondary CA:s from RapidSSL (as pem, pkcs7 and separate .crt) https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&id=AR1548
I can get it working on an apache server with the following settings:
SSLCertificateFile /root/ssl_certs/rapidssl.crt
SSLCertificateKeyFile /root/ssl_certs/privatekey.key
SSLCACertificateFile /root/ssl_certs/intermediate.crt
I have heard of something called a root certificate, and I don't know what that is. Is that something that I need?
I have heard that Tomcat should e able to use PKCS12 so I did this to try to create a pkcs12 file:
openssl pkcs12 -export -in rapidssl.crt -inkey privatekey.key -out mycert.p12 -name tomcat -CAfile intermediate.crt -caname root -chain
But I get the error
Error unable to get local issuer certificate getting chain.
The intermediate.crt has the primary and secondary CA:s in it.