ssl3_read_bytes:sslv3 alert certificate unknown

芃芃0029

SSL handshake error: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown 
 
但是客户端可以连接成功,服务端可以收到客户端的消息

9748 2 0
2个回答

walkor

sslv3 有安全漏洞,workerman默认屏蔽了sslv3。
你可以改成通过nginx或者apache代理ssl。或者通过改workerman源码把workerman的sslv3打开,位置
https://github.com/walkor/Workerman/blob/master/Connection/TcpConnection.php#L750

if($async){
    $type = STREAM_CRYPTO_METHOD_SSLv2_CLIENT | STREAM_CRYPTO_METHOD_SSLv23_CLIENT;
}else{
    $type = STREAM_CRYPTO_METHOD_SSLv2_SERVER | STREAM_CRYPTO_METHOD_SSLv23_SERVER;
}

改成

if($async){
    $type = STREAM_CRYPTO_METHOD_SSLv2_CLIENT | STREAM_CRYPTO_METHOD_SSLv23_CLIENT | STREAM_CRYPTO_METHOD_SSLv3_CLIENT;
}else{
    $type = STREAM_CRYPTO_METHOD_SSLv2_SERVER | STREAM_CRYPTO_METHOD_SSLv23_SERVER | STREAM_CRYPTO_METHOD_SSLv3_SERVER;
}

restart 重启workemran。

IMYFALT

不行啊,大佬,我改了之后还是出现这个错误

  • zw25023061 2020-08-14

    请问这个问题解决了吗,我也碰到这个问题。几天了,还没解决。还请赐教,万分感谢。QQ: 649039423

年代过于久远,无法发表回答
🔝