trustAnchors parameter | Oracle Community
Here is another answer. Unfortunately, Sun has not documented very well som important details of how its SSL subsystem works.... Hope that imporoves with time!The various keystore readers, such as com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl
appear to use FileInputStream to open the files. Therefore, the value of
javax.net.ssl.trustStore
must be either an absolute filesystem path, or a path relative to the working directory. It DOES NOT look for keystores in the classpath.
Why the code would do this instead of getResourceAsStream(path), and therefore to look in the classpath, is beyond me. Maybe that is considered a security feature?
In any case, although Sun documents many places the use of the javax.net.ssl.trustStore environmental parameter, none of the documentation indicates how the value of this parameter is used.
Now you know!
The SSL code should also throw an exception if it is unable to open the file indicated by the path. It does nott, exactly, What you get is that obscure exception message:
Read full article from trustAnchors parameter | Oracle Community
No comments:
Post a Comment