title: How to connect to Sybase ASE using JDBC driver and SSL connection
body: <p>I'm trying to establish an SSL connection to a Sybase ASE 15.7 using JDBC driver with no luck.
  I tried the following options:</p>
  
  <ol>
  <li><p>Using JTDS 1.25 driver (jtds-1.2.5.jar)</p>
  
  <p>With the following connection string: <code>jdbc:jtds:sybase://host:port;databaseName=dbname;ssl=request</code></p>
  
  <p>I got <code>Network error IOException: Connection refused</code></p></li>
  <li><p>Using Jconnect 4 (jconn4.jar)</p>
  
  <p>with the following connection string:</p>
  
  <p>jdbc:sybase:Tds:host:port/dbname?ENABLE_SSL=true</p>
  
  <p>I got <code>java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s)
  ...
  java.sql.SQLException: I/O Error: DB server closed connection.</code></p>
  
  <p>I checked the Sybase log see the following error: </p>
  
  <p><code>kernel  SSL or Crypto Error Message: 'The SSL handshake failed.  Root error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol'.</code></p>
  
  <p>it looks like the Sybase server expects SSL connection but the java client still not using SSL (although connection string property marks ssl=true).</p></li>
  </ol>
  
  <p>tried searching Sybase documentation with not much luck, neither for this error nor for SSL with JConnect.</p>
  
  <p>Any answer will be much appreciated - i'm flexible with the type of driver and the configuration.</p>
  
  <p>Thanks</p>