Mojolicious允许我在启动应用程序时指定ssl证书和密钥:
> ./myapp.pl prefork --listen 'https://*:8485&cert=my.crt&key=my.key'我正在尝试使用rapidssl证书来做这件事。连接到此服务会导致wget相当不高兴:
$ wget https://example.com:8485/
--2016-06-22 09:50:49-- https://example.com:8485/
Resolving example.com (example.com)... 1.3.2.4
Connecting to example.com (example.com)|1.3.2.4|:8485... connected.
ERROR: cannot verify example.com's certificate, issued by `/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3':
Unable to locally verify the issuer's authority.
To connect to example.com insecurely, use `--no-check-certificate'.这并不奇怪,因为当在其他应用程序中使用rapidssl证书时,我还必须指定一个中间证书。因此,我尝试通过将中间证书连接到站点证书来添加这一点,但这对结果没有任何影响。
我还尝试将中间证书和根证书放入一个单独的文件中,并从以下位置开始:
> ./myapp.pl prefork --listen 'https://*:8485&cert=my.crt&key=my.key&ca=myca.crt'但结果同样平淡无奇:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure请给我建议。
发布于 2016-06-24 20:33:34
如果您希望服务器不仅向客户端发送叶(服务器)证书,还向客户端发送任何其他(中间)证书,则只需以正确的顺序将这些证书添加到cert文件。这意味着您的my.crt应该如下所示
----BEGIN CERTIFICATE-----
MII... the leaf certificate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MII... the first intermediate certificate, i.e. the one which signed the leaf cert
-----END CERTIFICATE-----
...https://stackoverflow.com/questions/37967665
复制相似问题