yfijwan135
yfijwan135
2016-02-25 06:48

https请求忽略证书,在4.4系统上可以正常请求,4.2以下都报异常。

20
  • exception
  • 数据
  • 异常

https请求忽略证书,在4.4系统上正常请求,并返回数据,4.2及以下的系统,试过了,都报一下异常,无论真机还是模拟器。
02-25 05:33:23.591: W/System.err(6405): java.lang.RuntimeException: org.apache.harmony.security.asn1.ASN1Exception: ASN.1 UTCTime: wrong format for DER, identifier at [112]
02-25 05:33:23.591: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:599)
02-25 05:33:23.591: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
02-25 05:33:23.591: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:378)
02-25 05:33:23.591: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.(OpenSSLSocketImpl.java:636)
02-25 05:33:23.591: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:607)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.io.SocketInputBuffer.(SocketInputBuffer.java:70)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:83)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:170)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:106)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:129)
02-25 05:33:23.591: W/System.err(6405): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:172)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
02-25 05:33:23.601: W/System.err(6405): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
02-25 05:33:23.601: W/System.err(6405): at com.iiordanov.bVNC.AutoLoginActivity.initSSLAllWithHttpClient(AutoLoginActivity.java:1064)
02-25 05:33:23.601: W/System.err(6405): at com.iiordanov.bVNC.AutoLoginActivity$4.run(AutoLoginActivity.java:646)
02-25 05:33:23.601: W/System.err(6405): at java.lang.Thread.run(Thread.java:856)
02-25 05:33:23.601: W/System.err(6405): Caused by: org.apache.harmony.security.asn1.ASN1Exception: ASN.1 UTCTime: wrong format for DER, identifier at [112]
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.DerInputStream.readUTCTime(DerInputStream.java:135)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1UTCTime.decode(ASN1UTCTime.java:77)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1Choice.decode(ASN1Choice.java:308)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInputStream.java:554)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInputStream.java:105)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:40)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInputStream.java:554)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInputStream.java:105)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:40)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInputStream.java:554)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInputStream.java:105)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:40)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:82)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.security.provider.cert.X509CertImpl.(X509CertImpl.java:128)
02-25 05:33:23.601: W/System.err(6405): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:577)
02-25 05:33:23.601: W/System.err(6405): ... 19 more

请大神赐教!如果回答能解决我的问题,C币必追加!

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

6条回答