I'm working on a platform (java) which integrates with multiple (micro)services all the communication is over SSL. so the platform acts as a SSL Client.
I cant import all the certificates of different services into my platform truststore, instead we want to use different SSLContext for different services.
One of the downside to this approach is that we would need to maintain so many truststores.
We are thinking of getting the certificate chain from a service discovery and use the certificate as it is and input it to SSLContext without importing it into a trusstore and then using it.
TL;DR Is there a way to configure SSLContext in Java without using truststores but only using ca bundle as a PEM / cert ?