Код: Выделить всё
@Bean
public RestClient restClient(RestClient.Builder builder, RestClientSsl ssl) {
return builder.baseUrl("https://the-secure-api.com/api")
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE, HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.apply(ssl.fromBundle("mybundle"))
.build();
}
< /code>
spring:
ssl:
bundle:
jks:
mybundle:
keystore:
location: C:\\ssl\\keystore.p12
password: 123
type: PKCS12
truststore:
location: C:\\ssl\\truststore.p12
password: 123
type: PKCS12
reload-on-update: true
< /code>
This is working fine. The third-party app confirms they can see my client certificate being sent to them. I am also validating their certificate with my trust store. I would like to disable SSL validation on my side. I tried to remove this from the property, leaving .apply(ssl.fromBundle("mybundle"))Код: Выделить всё
spring:
ssl:
bundle:
jks:
mybundle:
keystore:
location: C:\\ssl\\keystore.p12
password: 123
type: PKCS12
reload-on-update: true
< /code>
And thought this would equal to InsecureTrustManagerFactory.INSTANCE Подробнее здесь: https://stackoverflow.com/questions/797 ... rustmanage