Spring HTTP Client Hostname Verification Fails with SAN Certificates Missing Expected Host
Problem Spring's RestTemplate and WebClient rely on the JDK's default HostnameVerifier for SSL certificate validation, enforcing RFC 2818 compliance. When connecting to servers presenting SAN certificates that do not include the exact hostname used in the request, validation fails with SSLHandshakeException containing 'hostname in certificate didn't match'.