You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a lot of boilerplate code just to use a custom TrustManager.
It would be great if the SslManagerBundle API could be improved to support custom TrustManager usage without requiring a KeyManagerFactory. This would simplify configuring SSL/TLS settings when custom TrustManager configurations are needed.
The text was updated successfully, but these errors were encountered:
/** * Factory method to create a new {@link SslManagerBundle} using the given * {@link TrustManagerFactory} and the default {@link KeyManagerFactory}. * @param trustManagerFactory the trust manager factory * @return a new {@link SslManagerBundle} instance * @since 3.5.0 */staticSslManagerBundlefrom(TrustManagerFactorytrustManagerFactory) {
Assert.notNull(trustManagerFactory, "TrustManagerFactory must not be null");
KeyManagerFactorydefaultKeyManagerFactory = createDefaultKeyManagerFactory();
returnof(defaultKeyManagerFactory, trustManagerFactory);
}
/** * Factory method to create a new {@link SslManagerBundle} using the given * {@link TrustManager TrustManagers} and the default {@link KeyManagerFactory}. * @param trustManagers the trust managers to use * @return a new {@link SslManagerBundle} instance * @since 3.5.0 */staticSslManagerBundlefrom(TrustManager... trustManagers) {
Assert.notNull(trustManagers, "TrustManagers must not be null");
KeyManagerFactorydefaultKeyManagerFactory = createDefaultKeyManagerFactory();
TrustManagerFactorydefaultTrustManagerFactory = createDefaultTrustManagerFactory();
returnof(defaultKeyManagerFactory, FixedTrustManagerFactory.of(defaultTrustManagerFactory, trustManagers));
}
The FixedTrustManagerFactory just returns the given TrustManagers on the getTrustManagers call.
mhalbritter
changed the title
Provide user-friendly API to use custom TrustManager in SSL (Manager) bundle
Make it easier to provide custom TrustManagers in SslManagerBundle
Nov 11, 2024
I would like to use a custom
TrustManager
, such as one that only accepts certain issuers, accept-all, etc.With current
SslManagerBundle
, I need to write something like this to use a customTrustManager
:This is a lot of boilerplate code just to use a custom
TrustManager
.It would be great if the
SslManagerBundle
API could be improved to support customTrustManager
usage without requiring aKeyManagerFactory
. This would simplify configuring SSL/TLS settings when customTrustManager
configurations are needed.The text was updated successfully, but these errors were encountered: