gpt4 book ai didi

javascript - 检测 WebSocket 的无效证书

转载 作者:行者123 更新时间:2023-11-30 17:25:10 24 4
gpt4 key购买 nike

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

如果是,怎么做到的?

最佳答案

不,这是不可能的。

客户端将以 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 处理程序将被调用,但它没有说明证书或其他特定问题。

https://www.rfc-editor.org/rfc/rfc6455#section-7.4

关于javascript - 检测 WebSocket 的无效证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24415183/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com