title: javax.net.ssl.SSLProtocolException: Failure in SSL library, usually a protocol error
body: <p>I have:</p>
  
  <ol>
  <li>Company.cert.pem</li>
  <li>ca_cert.pem</li>
  </ol>
  
  <p>and I am trying to perform a ssl connection.</p>
  
  <p>I generated <strong>mykeystore.bks</strong> from these two files(tried any combinations) and use the java code 
  from here <a href="https://stackoverflow.com/questions/2642777/trusting-all-certificates-using-httpclient-over-https">Trusting all certificates using HttpClient over HTTPS</a> - <strong>emmby</strong> responce. But all time I get the next error:</p>
  
  <pre><code>12-20 03:04:48.844: W/System.err(2087): javax.net.ssl.SSLProtocolException: Read error: ssl=0x2b6e50: Failure in SSL library, usually a protocol error
  12-20 03:04:48.854: W/System.err(2087):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
  12-20 03:04:48.854: W/System.err(2087):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:788)
  12-20 03:04:48.854: W/System.err(2087):     at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
  12-20 03:04:48.854: W/System.err(2087):     at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)
  12-20 03:04:48.854: W/System.err(2087):     at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)
  </code></pre>
  
  <p>*</p>
  
  <ol start="2">
  <li><a href="http://developer.android.com/reference/org/apache/http/conn/ssl/SSLSocketFactory.html" rel="nofollow noreferrer">http://developer.android.com/reference/org/apache/http/conn/ssl/SSLSocketFactory.html</a></li>
  </ol>
  
  <p>It seems that Android team proposes another approach for this purpose - but for me it's not clear.</p>