title: curl: Unknown SSL protocol error in connection
body: <p>I'm trying to connect from one server (A) in AWS to another server (B) in AWS with Tomcat 7 + SSL.</p>
  
  <p>Server A:</p>
  
  <ul>
  <li>Ubuntu 14.04</li>
  <li>OpenSSL 1.0.1f </li>
  </ul>
  
  <p>Server B:</p>
  
  <ul>
  <li>Ubuntu 13.04</li>
  <li>Tomcat 7</li>
  <li>OpenSSL 1.0.1c</li>
  <li>SSL Certificate</li>
  </ul>
  
  <p>I'm trying the following command in server A:</p>
  
  <pre><code>curl https://Server.B -v
  </code></pre>
  
  <p>And I get the following exception:</p>
  
  <pre><code>* Connection #0 to host test.salespredict.com left intact
  yakirm@ip-10-214-10-178:~$ curl https://Server.B.com -v
  * Rebuilt URL to: https://Server.B.com/
  * Hostname was NOT found in DNS cache
  *   Trying 54.245.81.*...
  * Connected to Server.B.com (54.245.81.*) port 443 (#0)
  * successfully set certificate verify locations:
  *   CAfile: none
    CApath: /etc/ssl/certs
  * SSLv3, TLS handshake, Client hello (1):
  * Unknown SSL protocol error in connection to Server.B.com:443 
  * Closing connection 0
  curl: (35) Unknown SSL protocol error in connection to Server.B.com:443 
  </code></pre>
  
  <p>I tried to check with OpenSSL</p>
  
  <pre><code>openssl s_client -connect Server.B.Address:443
  </code></pre>
  
  <p>I get the following result:</p>
  
  <pre><code>CONNECTED(00000003)
  140284858304160:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:184:
  ---
  no peer certificate available
  ---
  No client certificate CA names sent
  ---
  SSL handshake has read 0 bytes and written 307 bytes
  ---
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE
  ---
  </code></pre>
  
  <p>If I'm trying to connect from my own computer (OS X Mavericks), the curl success but the openssl command return the same.</p>
  
  <p><em>BTW</em></p>
  
  <p>If I'm trying:</p>
  
  <pre><code>curl https://Server.B -v -ssl3
  </code></pre>
  
  <p>It's work from Server A, but I don't want to specify the SSL protocol.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Server B - Tomcat Configuration:</p>
  
  <pre><code>&lt;Connector SSLEnabled="true" acceptCount="100" clientAuth="false" disableUploadTimeout="true" 
                     enableLookups="true" maxThreads="200" port="443" keystoreFile="/var/lib/tomcat7/conf/Path/Path_keystore" keystorePass="******" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" 
                     secure="true" sslProtocol="TLS" /&gt;
  </code></pre>