6e3d784a2c
Motivation: This is a PR to solve the problem described here: https://github.com/netty/netty/issues/9767 Basically this PR is to add two more APIs in SslContextBuilder, for users to directly specify the KeyManager or TrustManager they want to use when building SslContext. This is very helpful when users want to pass in some customized implementation of KeyManager or TrustManager. Modification: This PR takes the first approach in here: https://github.com/netty/netty/issues/9767#issuecomment-551927994 (comment) which is to immediately convert the managers into factories and let factories continue to pass through Netty. 1. Add in SslContextBuilder the two APIs mentioned above 2. Create a KeyManagerFactoryWrapper and a TrustManagerFactoryWrapper, which take a KeyManager and a TrustManager respectively. These are two simple wrappers that do the conversion from XXXManager class to XXXManagerFactory class 3.Create a SimpleKeyManagerFactory class(and internally X509KeyManagerWrapper for compatibility), which hides the unnecessary details such as KeyManagerFactorySpi. This serves the similar functionalities with SimpleTrustManagerFactory, which was already inside Netty. Result: Easier usage. |
||
---|---|---|
.. | ||
src | ||
pom.xml |