I am in the process of configuring TLS for Tomcat 8.5, Postgres communication using Self signed Certificate.
What would be the best means to provide Certificate, PK (bundled in PKCS12 format) to Tomcat and the CA certificate (root Certificate)?
Tomcat is set up as a Service, hence preferred would be to provide start up VM parameters. I have tried to provide these in Configure Tomcat -> Java Opts
-Djavax.net.ssl.keyStorePassword=changeit
-Djavax.net.ssl.trustStore=D:\test\data\pg_cert\truststore
-Djavax.net.ssl.trustStorePassword=changeit
However Tomcat doesn't seem to load these. If I test this using standalone Java class, then it is able to connect.
I have read somewhere that providing certificate in tomcat startup script could be an option, however to keep the changes minimal in production, this would be last option.