使用友盟的新浪分享,报错SSLSocket

昨天使用友盟分享SDK6.9.2时,新浪分享遇到了个问题:

java.lang.ClassCastException: java.net.Socket cannot be cast to javax.net.ssl.SSLSocket
          at com.android.okhttp.internal.http.HttpsEngine.connected(HttpsEngine.java:45)
          at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:303)
          at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
          at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
          at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:355)
          at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
          at com.android.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:161)
          at com.sina.weibo.sdk.net.HttpManager.requestHttpExecute(HttpManager.java:80)
          at com.sina.weibo.sdk.net.HttpManager.openUrl(HttpManager.java:63)
          at com.sina.weibo.sdk.utils.AidTask.loadAidFromNet(AidTask.java:400)
          at com.sina.weibo.sdk.utils.AidTask.access$200(AidTask.java:49)
          at com.sina.weibo.sdk.utils.AidTask$2.run(AidTask.java:232)
          at java.lang.Thread.run(Thread.java:848)

上网查了下,是由于新浪SDK的bug导致的,下载CA证书可解决此问题,在这里记录一下。

你可能感兴趣的:(使用友盟的新浪分享,报错SSLSocket)