title: Setup 2 way ssl authentication in Websphere Liberty and verify it
body: <p>I am using <a href="https://github.com/TooTallNate/Java-WebSocket" rel="nofollow">https://github.com/TooTallNate/Java-WebSocket</a> for my socket communication in my web server application. </p>
  
  <p>I want to set up mutual authentication in my service. I have set the keystore and truststore in my server and client application. What I am not able to figure out is, do I need to change code to perform 2 way authentication? Right now I am able to confirm that the communication is happening over a secure channel. Is there anyway to verify that <code>2 way SSL authentication (mutual authentication)</code> is happening? I am running my service on Websphere Liberty</p>
  
  <p>Source for ssl communication in Java websockets: <a href="https://github.com/TooTallNate/Java-WebSocket/blob/Java-WebSocket-1.3.0/src/main/java/org/java_websocket/SSLSocketChannel2.java" rel="nofollow">https://github.com/TooTallNate/Java-WebSocket/blob/Java-WebSocket-1.3.0/src/main/java/org/java_websocket/SSLSocketChannel2.java</a></p>
  
  <p>I see that in Liberty I can request for a client side certificate <a href="https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_sec_clientcert.html" rel="nofollow">https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_sec_clientcert.html</a>
  However why is it that I need to add the certificate in my browser? Shouldn't I be adding the client side certificate in my server's trust-store? </p>