我的RED5服务器

时间:2015-07-03 08:41:42

标签: actionscript-3 ssl red5 netconnection rtmps

我使用Flash Professional CC发布了AS3 flash,并为Flash Player13发布。

问题是:当我创建一个NetConnection到我的RTMP服务器(RED5 v1.1)时,我收到以下错误消息: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或我将其设置为任何其他选项,则永远不会建立连接,但如果我将其设置为" best",我有时可以创建连接,但并非总是如此。

在我的服务器中,我有一张由Geo Trust Inc签名的SSL证书及其公用名(CN)= * .mydomain.com

有人能帮帮我吗?如果需要,我可以提供更多信息。

祝你好运, Pimager

1 个答案:

答案 0 :(得分:0)

您可以启用ssl debug以在失败时获取更多详细信息;将此条目添加到您的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