title: Received fatal alert: handshake_failure through SSLHandshakeException
body: <p>I have a problem with authorized SSL connection. I have created Struts Action that connects to external server with Client Authorized SSL certificate. In my Action I am trying to send some data to bank server but without any luck, because I have as a result from server the following error: </p>
  
  <pre><code>error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
  </code></pre>
  
  <p>My Method from my Action class that sends data to server</p>
  
  <pre><code>//Getting external IP from host
      URL whatismyip = new URL("http://automation.whatismyip.com/n09230945.asp");
      BufferedReader inIP = new BufferedReader(new InputStreamReader(whatismyip.openStream()));
  
      String IPStr = inIP.readLine(); //IP as a String
  
      Merchant merchant;
  
      System.out.println("amount: " + amount + ", currency: " + currency + ", clientIp: " + IPStr + ", description: " + description);
  
      try {
  
          merchant = new Merchant(context.getRealPath("/") + "merchant.properties");
  
      } catch (ConfigurationException e) {
  
          Logger.getLogger(HomeAction.class.getName()).log(Level.INFO, "message", e);
          System.err.println("error: " + e.getMessage());
          return ERROR;
      }
  
      String result = merchant.sendTransData(amount, currency, IPStr, description);
  
      System.out.println("result: " + result);
  
      return SUCCESS;
  </code></pre>
  
  <p>My merchant.properties file:</p>
  
  <pre><code>bank.server.url=https://-servernameandport-/
  https.cipher=-cipher-
  
  keystore.file=-key-.jks
  keystore.type=JKS
  keystore.password=-password-
  ecomm.server.version=2.0
  
  encoding.source=UTF-8
  encoding.native=UTF-8
  </code></pre>
  
  <p>For the first time I thought this is a certificate problem, I converted it from .pfx to .jks, but I have the same error, with no changes.</p>