I need help / guidance with what can be the possible issue when I am trying to call a rest api on SSL (TLS) connection. I have a private key and signed cert from the data producer, I created the keystore from these to files and with code build a SSLContext, I use this context while making Http connection with the producer's server. Now the issue is, I am able to make connection with Java 8 but handshake fails for Java 17.
What am I missing ? are java 8 certificates compatible with java 17 ? I read a little and found Java 17 introduced TLSv1.3 but my SSL Handshake is failing with this version as well.
I tried using Java 11 and Java 17 but looks like the SSLContext is only working with Java 8, and I am able to fetch the response over REST.
Can someone who has faced similar scenario or aware of what can be the possible issue, help me out here.
Below is the log snippet (masked endpoints) ::
19:06:42.772 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {tls}->http://<proxy_URL>:82->https://<endpoint_URL>:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 60000]
19:06:42.793 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {tls}->http://<proxy_URL>:82->https://<endpoint_URL>:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 60000]
19:06:42.795 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {tls}->http://<proxy_URL>:82->https://<endpoint_URL>:443
19:06:42.818 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to <proxy_URL>/10.10.10.11:82
19:06:42.821 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 10.10.10.10:55188<->10.10.10.11:82
19:06:42.823 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> CONNECT <endpoint_URL>:443 HTTP/1.1
19:06:42.823 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: <endpoint_URL>
19:06:42.823 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.4)
19:06:42.824 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "CONNECT <endpoint_URL>:443 HTTP/1.1[\r][\n]"
19:06:42.824 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: <endpoint_URL>[\r][\n]"
19:06:42.824 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.4)[\r][\n]"
19:06:42.824 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
19:06:42.871 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 403 Forbidden[\r][\n]"'