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

gateway-worker開啟ssl,客戶端連接報錯

周大媽

問題描述

gateway開啟ssl,客戶端連接報錯

程序代碼

$context = array(

'ssl' => array(
    // 請使用絕對路徑
    'local_cert'                 => __DIR__.'/../../../../cert/www.kkk.com.pem', // 也可以是crt文件
    'local_pk'                   => __DIR__.'/../../../../cert/www.kkk.com.key',
    'verify_peer'                => false,
    'allow_self_signed'          => true, //如果是自簽名證書需要開啟此選項
)

);
$gateway = new Gateway("websocket://0.0.0.0:9999",$context);
$gateway->transport = 'ssl';

報錯信息

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

操作系統(tǒng)及workerman/webman等框架組件具體版本

windows系統(tǒng), gateway-worker版本v3.0.22

1415 2 0
2個回答

小W

為啥不使用nginx?

  • 周大媽 2023-08-22

    使用nginx也是報這個錯誤的

  • 小W 2023-08-22

    把配置發(fā)出來?

  • 小W 2023-08-22

    證書沒問題嗎?

  • 周大媽 2023-08-22

    server {
    listen 443 ssl;
    ssl_certificate D:/phpstudy_pro/Extensions/Nginx1.15.11/conf/ssl/certificate.crt;
    ssl_certificate_key D:/phpstudy_pro/Extensions/Nginx1.15.11/conf/ssl/private.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    server_name www.mmm.com;
    root "D:/phpstudy_pro/WWW/ttt";
    location /wss
    {
    proxy_pass http://127.0.0.1:9999;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header X-Real-IP $remote_addr;
    }
    location / {
    index index.php index.html error/index.html;
    error_page 400 /error/400.html;
    error_page 403 /error/403.html;
    error_page 404 /error/404.html;
    error_page 500 /error/500.html;
    error_page 501 /error/501.html;
    error_page 502 /error/502.html;
    error_page 503 /error/503.html;
    error_page 504 /error/504.html;
    error_page 505 /error/505.html;
    error_page 506 /error/506.html;
    error_page 507 /error/507.html;
    error_page 509 /error/509.html;
    error_page 510 /error/510.html;
    include D:/phpstudy_pro/WWW/ttt/nginx.htaccess;
    autoindex off;
    }
    location ~ .php(.*)$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
    include fastcgi_params;
    }
    }

  • 周大媽 2023-08-22

    $context = array(

    'ssl' => array(
        // 請使用絕對路徑
        'local_cert'                 => __DIR__.'/../../../../cert/certificate.crt', // 也可以是crt文件
        'local_pk'                   => __DIR__.'/../../../../cert/private.key',
        'verify_peer'                => false,
        'allow_self_signed'          => true, //如果是自簽名證書需要開啟此選項
    )

    );

    // gateway 進(jìn)程,這里使用Text協(xié)議,可以用telnet測試
    $gateway = new Gateway("websocket://0.0.0.0:9999");
    //$gateway->transport = 'ssl';

  • 小W 2023-08-22

    你的證書和域名匹配嗎?

  • 小W 2023-08-22

    ssl_certificate 不是應(yīng)該用pem嗎,你咋用了crt

  • 周大媽 2023-08-22

    我檢查了
    是匹配的

  • 周大媽 2023-08-22

    我當(dāng)初生成證書的時候,common name 就是填寫的我的域名

  • 小W 2023-08-22

    ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

  • 周大媽 2023-08-22

    不行

liong

http://www.wtbis.cn/q/1440
這里可以解答你的問題

  • 暫無評論
年代過于久遠(yuǎn),無法發(fā)表回答
??