国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

SSL handshake error: stream_socket_enable_crypto()

阿星

問題描述

wss請求的時候報錯
SSL handshake error: stream_socket_enable_crypto(): SSL_R_NO_SHARED_CIPHER: no suitable shared cipher could be used. This could be because the server is missing an SSL certificate (local_cert context option)

程序代碼

// 實例化 Websocket 服務(wù)
        $this->worker = new Worker($this->socket ?: $this->protocol . '://' . $this->host . ':' . $this->port, $this->context);
        $this->worker->transport = 'ssl'; // 使用 SSL 傳輸協(xié)議
        $this->worker->ssl = [ // 配置 SSL 證書路徑
            'local_cert'                 => __DIR__.'/../../../nginx/runrise.com.cn_bundle.crt', // 也可以是crt文件
            'local_pk'                   => __DIR__.'/../../../nginx/runrise.com.cn.key',
            'verify_peer' => false, // 是否驗證客戶端證書(通常不需要)
//            'allow_self_signed' => true, //如果是自簽名證書需要開啟此選項
        ];

報錯信息

SSL handshake error: stream_socket_enable_crypto(): SSL_R_NO_SHARED_CIPHER: no suitable shared cipher could be used.  This could be because the server is missing an SSL certificate (local_cert context option)
209 1 0
1個回答

jolalau

你這證書路徑不對吧?檢查下是否路徑問題

  • 暫無評論
??