In my java Code i am creating one instance of SSL Context using command
SSLContext ctx = SSLContext.getInstance("TLS");
But in my tomcat server i am setting TLSv1.2 and i am getting handshake error.
How we can support all the TLS protocols using this method like in cpp we have SSLV23 client method which will support all protocols.
2? (SSL) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server. Added in 7.34.
SSL has long been defunct — replaced by TLS and its subsequent versions — TLS 1.0, TLS 1.1, and TLS 1.2. And with TLS 1.0 and 1.1 deprecated as of the end of 2020, organizations and web hosts who wish to ensure data safety need to make the move to support TLS 1.2 across all of their deployments.
To use TLSv1.2 try to use below code:
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With