title: Security with HTTPS and SSL :-javax.net.ssl.SSLHandshakeException: Certificate expired
body: <p>I have tried command for check <strong>Missing intermediate certificate authority</strong> using this command </p>
  
  <pre><code>$ openssl s_client -connect mail.google.com:443
  </code></pre>
  
  <p>For my website which should be shown certificate chain but it only shows one certificate which is already expired.
  but when i checked server certificate configuration on <a href="https://www.digicert.com/help/" rel="nofollow">https://www.digicert.com/help/</a></p>
  
  <p>it shows SSL Certificate is correctly installed and showing proper intermediate certificate chain and when i try to access web api in my android app it shows following error :-</p>
  
  <pre><code>javax.net.ssl.SSLHandshakeException: Certificate expired at Thu Jun 11 21:58:21 GMT+05:30 2015 (compared to Wed May 18 10:48:45 GMT+05:30 2016)
  05-18 10:48:45.750 28372-28412/com.src.giveup1 W/System.err:     at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:327)
  05-18 10:48:45.750 28372-28412/com.src.giveup1 W/System.err:     at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:638)
  05-18 10:48:45.750 28372-28412/com.src.giveup1 W/System.err:     at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:600)
  05-18 10:48:45.750 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.io.SocketInputBuffer.&lt;init&gt;(SocketInputBuffer.java:75)
  05-18 10:48:45.750 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:93)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:187)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:123)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:134)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:196)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:365)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:602)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:522)
  05-18 10:48:45.751 28372-28412/com.src.giveup1 W/System.err:     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:500)
  </code></pre>
  
  <p>i am using the following link for checking server certificate in android app :- 
  <a href="http://blog.fordemobile.com/2012/04/https-requests-on-android.html" rel="nofollow">http://blog.fordemobile.com/2012/04/https-requests-on-android.html</a></p>
  
  <p>Is the certificate is properly configured on server or i am using the wrong code for checking the certificate.</p>