websphere ssl 握手失败
websphere ssl handshake failure
我将 rad 与 websphere 版本 8.0.0.9 一起使用,但出现错误
[7/5/2018 12:27:46:973 EEST] 0000002d webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[gr.mess.web.servlets.LoginServlet]: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.o.a(o.java:32)
at com.ibm.jsse2.o.a(o.java:3)
at com.ibm.jsse2.SSLSocketImpl.b(SSLSocketImpl.java:817)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:500)
at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:645)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:138)
at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:268)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:165)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:27)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1043)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:62)
at gr.mess.web.servlets.LoginServlet.routeeAuthenticate(LoginServlet.java:131)
at gr.mess.web.servlets.LoginServlet.doPost(LoginServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
at com.ibm.io.async.ResultHandler.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
我正在尝试连接到 https://www.routee.net/ 短信 api。两个月前我试过了,它很成功,但现在我尝试了,我似乎无法 connect.I 我尝试了很多东西,比如使用充气城堡提供者和他们的罐子(对于 jdk 1.6),添加 local_policy.jar 和 US_export_policy.jar 。我还尝试从 websphere secure admin 更改安全设置,更改有关 ssl tsl 版本的 ssl 设置,但似乎没有任何效果 me.I 也尝试从端口接收证书,但同样的 ssl 握手错误 occures.I 尝试过获得其他 url 的证书,但这次我成功了(例如 www.google.com )。这里会是什么情况?jdk 1.6 的东西,特定的 url?有什么建议吗?
这是我在两个月前找到的连接代码示例
private String routeeAuthenticate() throws MalformedURLException, IOException {
/* Base64.Encoder encoder = Base64.getEncoder();*/
/* String toEncode = "Encoding and Decoding in Base64 Test";*/
//Encoding in b64
/* routeeAppId.getBytes()*/
/* System.out.println(encoded);
//Decoding in b64
byte[] decodeResult = new BASE64Decoder().decodeBuffer(encoded);
System.out.println(new String(decodeResult));*/
String authString = routeeAppId + ":" + routeeAppSecret;
String token = new BASE64Encoder().encode(authString.getBytes());
//String token = encoder.encodeToString(authString.getBytes());
String accessToken = "";
URL url = new URL("https://auth.routee.net/oauth/token");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic " + token);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream (connection.getOutputStream());
wr.writeBytes("grant_type=client_credentials");
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
try {
JSONParser parser = new JSONParser();
JSONObject jsonObject = (JSONObject)parser.parse(response.toString());
accessToken = (String) jsonObject.get("access_token");
System.out.println("AccessToken======"+accessToken+"!!!");
} catch (Exception e) {
e.printStackTrace();
}
return accessToken;
}
URL 您似乎需要 TLSv1.2 和 ECC 密码。您能否启用 Webphere 以使用 SSL_TLSv2 或 TLSv1.2。要使 WebSphere 使用具有 HIGH 安全级别的 ECC 密码,您需要将安全性 属性 com.ibm.websphere.ssl.include.ECCiphers 设置为 true。
您可以在此处的知识中心找到相关信息:https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/usec_seccustomprop.html
或在此处的 Whosebug 中:https://developer.ibm.com/answers/questions/303331/how-can-i-enable-elliptical-curve-cryptography-ecc/
我将 rad 与 websphere 版本 8.0.0.9 一起使用,但出现错误
[7/5/2018 12:27:46:973 EEST] 0000002d webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[gr.mess.web.servlets.LoginServlet]: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.o.a(o.java:32)
at com.ibm.jsse2.o.a(o.java:3)
at com.ibm.jsse2.SSLSocketImpl.b(SSLSocketImpl.java:817)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:500)
at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:645)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:138)
at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:268)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:165)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:27)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1043)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:62)
at gr.mess.web.servlets.LoginServlet.routeeAuthenticate(LoginServlet.java:131)
at gr.mess.web.servlets.LoginServlet.doPost(LoginServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
at com.ibm.io.async.ResultHandler.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
我正在尝试连接到 https://www.routee.net/ 短信 api。两个月前我试过了,它很成功,但现在我尝试了,我似乎无法 connect.I 我尝试了很多东西,比如使用充气城堡提供者和他们的罐子(对于 jdk 1.6),添加 local_policy.jar 和 US_export_policy.jar 。我还尝试从 websphere secure admin 更改安全设置,更改有关 ssl tsl 版本的 ssl 设置,但似乎没有任何效果 me.I 也尝试从端口接收证书,但同样的 ssl 握手错误 occures.I 尝试过获得其他 url 的证书,但这次我成功了(例如 www.google.com )。这里会是什么情况?jdk 1.6 的东西,特定的 url?有什么建议吗?
这是我在两个月前找到的连接代码示例
private String routeeAuthenticate() throws MalformedURLException, IOException {
/* Base64.Encoder encoder = Base64.getEncoder();*/
/* String toEncode = "Encoding and Decoding in Base64 Test";*/
//Encoding in b64
/* routeeAppId.getBytes()*/
/* System.out.println(encoded);
//Decoding in b64
byte[] decodeResult = new BASE64Decoder().decodeBuffer(encoded);
System.out.println(new String(decodeResult));*/
String authString = routeeAppId + ":" + routeeAppSecret;
String token = new BASE64Encoder().encode(authString.getBytes());
//String token = encoder.encodeToString(authString.getBytes());
String accessToken = "";
URL url = new URL("https://auth.routee.net/oauth/token");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic " + token);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream (connection.getOutputStream());
wr.writeBytes("grant_type=client_credentials");
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
try {
JSONParser parser = new JSONParser();
JSONObject jsonObject = (JSONObject)parser.parse(response.toString());
accessToken = (String) jsonObject.get("access_token");
System.out.println("AccessToken======"+accessToken+"!!!");
} catch (Exception e) {
e.printStackTrace();
}
return accessToken;
}
URL 您似乎需要 TLSv1.2 和 ECC 密码。您能否启用 Webphere 以使用 SSL_TLSv2 或 TLSv1.2。要使 WebSphere 使用具有 HIGH 安全级别的 ECC 密码,您需要将安全性 属性 com.ibm.websphere.ssl.include.ECCiphers 设置为 true。
您可以在此处的知识中心找到相关信息:https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/usec_seccustomprop.html
或在此处的 Whosebug 中:https://developer.ibm.com/answers/questions/303331/how-can-i-enable-elliptical-curve-cryptography-ecc/