程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程解疑 >> 數據-https請求忽略證書,在4.4系統上可以正常請求,4.2以下都報異常。

數據-https請求忽略證書,在4.4系統上可以正常請求,4.2以下都報異常。

編輯:編程解疑
https請求忽略證書,在4.4系統上可以正常請求,4.2以下都報異常。

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幣必追加!

最佳回答:


看來沒有合理的方案了,這個問題已解決。是服務器做了更改。既然沒有人給出有效的方案,只要結貼了

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved