Last active
November 27, 2023 02:54
-
-
Save sandipchitale/42be354b98a531a49dfda3d6dcd3ff62 to your computer and use it in GitHub Desktop.
SslBundles #https #ssl #sslbundles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.netty.handler.ssl.util.InsecureTrustManagerFactory; | |
import io.netty.handler.ssl.util.KeyManagerFactoryWrapper; | |
import javax.net.ssl.KeyManager; | |
SslManagerBundle insecureSslManagerBundle = SslManagerBundle.of( | |
new KeyManagerFactoryWrapper(new KeyManager() {}), | |
InsecureTrustManagerFactory.INSTANCE); | |
insecureSslBundle = SslBundle.of(null, | |
null, | |
null, | |
null, | |
insecureSslManagerBundle); | |
WebClient webClient = WebClient.builder() | |
.apply(webClientSsl.fromBundle(insecureSslBundle)) | |
.build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
ssl: | |
bundle: | |
jks: | |
cacerts: | |
truststore: | |
type: PKCS12 | |
location: "${java.home}/lib/security/cacerts" | |
password: changeit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment