4

I am developing an android application using Google Places API. Until last night the app was working perfectly fine and I was going to launch it today and suddenly i started getting SSLHandShakeException. What I dont understand is how did this suddenly happen? I created a new API key with a new package name and I am getting the same error. Kindly let me know what should be done.

11-05 16:18:46.459: W/System.err(1022): javax.net.ssl.SSLHandshakeException: com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Tue Nov 05 16:18:46 GMT+00:00 2013, validation time: Wed Nov 06 14:00:40 GMT+00:00 2013
11-05 16:18:46.459: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:413)
11-05 16:18:46.459: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:257)
11-05 16:18:46.459: W/System.err(1022):     at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:191)
11-05 16:18:46.469: W/System.err(1022):     at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:276)
11-05 16:18:46.469: W/System.err(1022):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:375)
11-05 16:18:46.469: W/System.err(1022):     at sn.createSocket(SourceFile:157)
11-05 16:18:46.469: W/System.err(1022):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
11-05 16:18:46.479: W/System.err(1022):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
11-05 16:18:46.479: W/System.err(1022):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
11-05 16:18:46.479: W/System.err(1022):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
11-05 16:18:46.479: W/System.err(1022):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
11-05 16:18:46.479: W/System.err(1022):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
11-05 16:18:46.489: W/System.err(1022):     at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:257)
11-05 16:18:46.489: W/System.err(1022):     at sl.a(SourceFile:200)
11-05 16:18:46.489: W/System.err(1022):     at sl.execute(SourceFile:242)
11-05 16:18:46.489: W/System.err(1022):     at sl.execute(SourceFile:310)
11-05 16:18:46.489: W/System.err(1022):     at fqz.g(SourceFile:126)
11-05 16:18:46.499: W/System.err(1022):     at fqz.c(SourceFile:172)
11-05 16:18:46.499: W/System.err(1022):     at ftq.run(SourceFile:418)
11-05 16:18:46.499: W/System.err(1022):     at ftp.b(SourceFile:224)
11-05 16:18:46.499: W/System.err(1022):     at ftp.run(SourceFile:198)
11-05 16:18:46.509: W/System.err(1022):     at frh.run(SourceFile:96)
11-05 16:18:46.509: W/System.err(1022): Caused by: java.security.cert.CertificateException: com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Tue Nov 05 16:18:46 GMT+00:00 2013, validation time: Wed Nov 06 14:00:40 GMT+00:00 2013
11-05 16:18:46.509: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:204)
11-05 16:18:46.509: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:163)
11-05 16:18:46.519: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:593)
11-05 16:18:46.519: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
11-05 16:18:46.519: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:410)
11-05 16:18:46.519: W/System.err(1022):     ... 21 more
11-05 16:18:46.519: W/System.err(1022): Caused by: com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Tue Nov 05 16:18:46 GMT+00:00 2013, validation time: Wed Nov 06 14:00:40 GMT+00:00 2013
11-05 16:18:46.529: W/System.err(1022):     at com.android.org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1493)
11-05 16:18:46.529: W/System.err(1022):     at com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:364)
11-05 16:18:46.529: W/System.err(1022):     at java.security.cert.CertPathValidator.validate(CertPathValidator.java:190)
11-05 16:18:46.539: W/System.err(1022):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:191)
11-05 16:18:46.539: W/System.err(1022):     ... 25 more
11-05 16:18:46.539: W/System.err(1022): Caused by: java.security.cert.CertificateNotYetValidException: current time: Tue Nov 05 16:18:46 GMT+00:00 2013, validation time: Wed Nov 06 14:00:40 GMT+00:00 2013
11-05 16:18:46.549: W/System.err(1022):     at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:145)
11-05 16:18:46.549: W/System.err(1022):     at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:139)
11-05 16:18:46.549: W/System.err(1022):     at com.android.org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1484)
11-05 16:18:46.549: W/System.err(1022):     ... 28 more
1
  • 1
    "Until last night the app was working perfectly fine and I was going to launch it today and suddenly i started getting SSLHandShakeException" - With all things being static and equal, it sounds like a certificate expired on you (time is the only thing that has changed). Commented Dec 22, 2014 at 9:39

2 Answers 2

7

Check system time. Make sure its up to date.

Sign up to request clarification or add additional context in comments.

Comments

1

I did lot of digging and found out numerous ways to go over this problem. However the case with me was my app was running perfectly fine until the day on which i wanted to run it for one last time before publishing it and that was v.suprising. I kept on making changes and wrote different codes to accept any certificate. When I went home I ran my previous code and it executed successfully. I realized that there was network security issue in my corporate network and that was preventing my app to contact google servers. So this issue was temporary and in my case I had to do nothing special.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.