This is the piece of code that I am using :
if (config.getTruststore() != null) { // If there is a custom stargate-filter.truststore set in application.properties