cbitstech / Purple-Robot

Sensing and automation platform for Android.
Other
38 stars 19 forks source link

Load JSON Config Option not functional on some devices. #191

Closed JohnJ-Guiry closed 11 years ago

JohnJ-Guiry commented 11 years ago

Causes an SSLHandshakeException from line 156 in LegacyJSONConfigFile.java. P.R Version 1.3.2. Device was running Android 2.3.

Logcat logs below ...

06-29 02:33:16.639: W/System.err(2045): javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Fri Jun 29 02:33:16 CDT 2012, validation time: Wed Dec 12 09:58:50 CST 2012 06-29 02:33:16.647: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:477) 06-29 02:33:16.647: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328) 06-29 02:33:16.655: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.setupSecureSocket(HttpConnection.java:185) 06-29 02:33:16.655: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:433) 06-29 02:33:16.655: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeConnection(HttpsURLConnectionImpl.java:387) 06-29 02:33:16.655: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1018) 06-29 02:33:16.662: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:512) 06-29 02:33:16.662: W/System.err(2045): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:258) 06-29 02:33:16.662: W/System.err(2045): at edu.northwestern.cbits.purple_robot_manager.config.LegacyJSONConfigFile$1.run(LegacyJSONConfigFile.java:156) 06-29 02:33:16.662: W/System.err(2045): at java.lang.Thread.run(Thread.java:1019) 06-29 02:33:16.662: W/System.err(2045): Caused by: java.security.cert.CertificateException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Fri Jun 29 02:33:16 CDT 2012, validation time: Wed Dec 12 09:58:50 CST 2012 06-29 02:33:16.678: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:144) 06-29 02:33:16.678: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:115) 06-29 02:33:16.678: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:662) 06-29 02:33:16.678: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method) 06-29 02:33:16.678: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:474) 06-29 02:33:16.678: W/System.err(2045): ... 9 more 06-29 02:33:16.678: W/System.err(2045): Caused by: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Fri Jun 29 02:33:16 CDT 2012, validation time: Wed Dec 12 09:58:50 CST 2012 06-29 02:33:16.678: W/System.err(2045): at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1521) 06-29 02:33:16.678: W/System.err(2045): at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:399) 06-29 02:33:16.678: W/System.err(2045): at java.security.cert.CertPathValidator.validate(CertPathValidator.java:197) 06-29 02:33:16.686: W/System.err(2045): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:140) 06-29 02:33:16.686: W/System.err(2045): ... 13 more 06-29 02:33:16.686: W/System.err(2045): Caused by: java.security.cert.CertificateNotYetValidException: current time: Fri Jun 29 02:33:16 CDT 2012, validation time: Wed Dec 12 09:58:50 CST 2012 06-29 02:33:16.686: W/System.err(2045): at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:163) 06-29 02:33:16.686: W/System.err(2045): at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:157) 06-29 02:33:16.686: W/System.err(2045): at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1512) 06-29 02:33:16.686: W/System.err(2045): ... 16 more

audaciouscode commented 11 years ago

Please post the original URL so I can investigate further.

audaciouscode commented 11 years ago

Addressed in 1.4.4.