Make SimpleSSLContextFactory#configuration public and return unmodifiable map #1085
Labels
enhancement
A request for change or improvement to an existing feature
Milestone
Change
SimpleSSLContextFactory#configuration
visibility topublic
. The reason is that I wanted to access this while implementing #1080 from a test in a different package.After some consideration, making it public adds some value, since it permits inspection of the properties used to generate
SSLContext
instances. The main caveat, which should be included in the javadoc, is that the returned map contains thekey and trust store passwords.
Of course, in order to even create an instance of
SimpleSSLContextFactory
, the calling code needs to have that information anyway, so allowing it to be returned here, while not ideal, isn't the end of the world, especially when you consider that callers could use reflection to inspect the internal properties. We could only fix this by changing the design such thatSimpleSSLContextFactory
does not store properties internally, which would be a complete redesign that we're not interested in doing at presentPlus, callers can choose to use
KiwiSecurity
directly instead of usingSimpleSSLContextFactory
, since the latter is just an abstraction over the former.The text was updated successfully, but these errors were encountered: