我有一个使用 Flash Professional CC 发布并为 Flash Player13 发布的 AS3 Flash。
问题是:当我创建到我的 RTMP 服务器 (RED5 v1.1) 的 NetConnection 时,我收到以下错误消息:NetConnection.Connect.SSLHandshakeFailed。
我使用的代码如下:
nc = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF3;
nc.client = this;
nc.proxyType = "best";
nc.addEventListener(NetStatusEvent.NET_STATUS, netSAServerRTMPStatus);
nc.connect("rtmps://myappserver.mydomain.com/myApp", myChannel);
private function netSAServerRTMPStatus(event:NetStatusEvent):void
{
trace(event.info.code);
}
如果我没有设置 proxyType 或我将它设置为任何其他选项,连接永远不会建立,但如果我将它设置为“最佳”,我有时可以创建连接,但并非总是如此。
在我的服务器中,我有一个由 Geo Trust Inc 签名的 SSL 证书,它的通用名称 (CN) = *.mydomain.com
谁能帮帮我?如果需要,我可以提供更多信息。
最好的问候, 画画师
最佳答案
您可以启用 ssl 调试以在失败时获取更多详细信息;将此条目添加到您的 JAVA_OPTS:
-Djavax.net.debug=ssl
然后您将在日志中看到如下条目:
javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 not enabled or not supported
和/或
Exception caught on session: 1 id: EPP7XKEM0XUWC javax.net.ssl.SSLHandshakeException: SSL handshake failed.
在所示情况下,客户端请求 TLSv1 并被拒绝。
更新
您可以测试的另一件事是通过 red5.sh 中的参数启用遗留内容;将这些添加到您的 JAVA_OPTS:
-Dsun.security.ssl.allowUnsafeRenegotiation=true -Dsun.security.ssl.allowLegacyHelloMessages=true
您可以找到有关这些参数的信息 here .
关于actionscript-3 - 我的 RED5 服务器中的代码 NetConnection.Connect.SSLHandshakeFailed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31202348/