为 API 使用 soundcloud JAVA 包装器时,
ApiWrapper wrapper = new ApiWrapper("id","secret", null, null, Env.SANDBOX);
try {
wrapper.login("user", "pw"); // fail here
} catch (IOException e) {
e.printStackTrace();
}
我收到以下 SSL 异常错误:
SSLPeerUnverifiedException
完整的异常详细信息:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:399)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:597)
at com.soundcloud.api.ApiWrapper.safeExecute(ApiWrapper.java:550)
at com.soundcloud.api.ApiWrapper.requestToken(ApiWrapper.java:266)
at com.soundcloud.api.ApiWrapper.login(ApiWrapper.java:143)
at de.voidplus.soundcloud.Sketch.setup(Sketch.java:23)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:680)
我使用了java-api-wrapper-1.1.2-all.jar
所有依赖项。我用 Java 1.6 编译它。我也在使用处理核心库,但这应该不是问题。
有任何想法吗?