One-way TLS Socket Communication is going through even though client side code is set with needClientAuth(true)

141 Views Asked by At

The communication is made one way ,Though truststore is empty from client side ,SSL handshake failure is not happening which is expected instead the communication is going through.

My understanding by adding this ((SSLSocket)s).setNeedClientAuth(true); will check for one-way . this particular code is added in client side

1

There are 1 best solutions below

0
Rajiv On

Sorry it was my misunderstanding , once you have a valid keystore & truststore loaded part of server & client , it's by default it starts working as one-way for which we don't need to set any field in case if required to implement two-way from server side you need to set setNeedClientAuth(true)