We have a java application that reads our customers public calendars - for example from google (https://calendar.google.com/calendar/ical/...) or icloud (webcal://p58-caldav.icl
I faced Received fatal alert: decode_error
while connecting with apple cloud urls. I was able to fix it by explicitly setting the protocol as TLS 1.2
.
For eg: in kotlin
update your spring RestTemplate
as below ,
fun restTemplateWithTLS12(): RestTemplate {
val requestFactory = HttpComponentsClientHttpRequestFactory()
val sslContext = SSLContexts.custom().setProtocol("TLSv1.2").build()
val clientBuilder =
HttpClients.custom().setSSLSocketFactory(SSLConnectionSocketFactory(sslContext))
requestFactory.httpClient = clientBuilder.build()
return RestTemplate(requestFactory)
}