检测WebSocket的无效证书

时间:2014-06-25 17:40:02

标签: javascript websocket detection certificate-authority

是否可以检测到由于证书无效而关闭了安全websocket?

若然,怎么样?

1 个答案:

答案 0 :(得分:2)

不,这是不可能的。

客户端将以1006代码关闭:

  

1006

  1006 is a reserved value and MUST NOT be set as a status code in a
  Close control frame by an endpoint.  It is designated for use in
  applications expecting a status code to indicate that the
  connection was closed abnormally, e.g., without sending or
  receiving a Close control frame.

此外,将调用onerror处理程序,但它没有提及证书或其他特定问题。

http://tools.ietf.org/html/rfc6455#section-7.4