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
@Bean("sslHandshakeIgnoreRestTemplate") | |
public RestTemplate sslHandshakeIgnoreRestTemplate() { | |
// Create a TrustManager that accepts all certificates | |
TrustManager[] trustAllCertificates = new TrustManager[] { | |
new X509TrustManager() { | |
public X509Certificate[] getAcceptedIssuers() { | |
return null; | |
} | |
public void checkClientTrusted(X509Certificate[] certs, String authType) {} | |
public void checkServerTrusted(X509Certificate[] certs, String authType) {} |
NewerOlder