在Twilio API调用上获取SSLPeerUnverifiedException

时间:2016-06-14 15:39:32

标签: java twilio sslhandshakeexception

自从过去3年以来,我们正在使用twilio-java-sdk-3.4.1。它工作正常,直到5月31日。从那时起,我们将获得所有美国号码的例外情况。在那段时间Twilio结束时是否发生了任何变化?我们正在使用java 8。

java.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.twilio.sdk.TwilioRestClient.request(TwilioRestClient.java:443)
    at com.twilio.sdk.TwilioRestClient.safeRequest(TwilioRestClient.java:587)
    at com.twilio.sdk.TwilioRestClient.safeRequest(TwilioRestClient.java:564)
    at com.twilio.sdk.resource.list.SmsList.create(SmsList.java:70)

Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
    at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:453)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:200)
    at org.apache.http.impl.conn.AbstractPoolEntry.layerProtocol(AbstractPoolEntry.java:277)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.layerProtocol(AbstractPooledConnAdapter.java:142)
    at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:770)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:577)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
    at com.twilio.sdk.TwilioRestClient.request(TwilioRestClient.java:416)

1 个答案:

答案 0 :(得分:0)