【问题标题】:Node.js HTTPS server verification failedNode.js HTTPS 服务器验证失败
【发布时间】:2017-07-16 21:58:54
【问题描述】:

我使用 HTTPS 协议创建了一个 Node.js 应用程序。我遵循了 nodejitsu https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/ 的教程

但是当我向服务器发送请求时,出现以下错误:

curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

当我从 Chrome 打开时,我只能在按高级后访问该页面并继续该页面。

这是我生成证书时填写的:

Country Name (2 letter code) [AU]:ID
State or Province Name (full name) [Some-State]:East Java
Locality Name (eg, city) []:[my city name]
Organization Name (eg, company) [Internet Widgits Pty Ltd]:[some string]
Organizational Unit Name (eg, section) []:[some string]
Common Name (e.g. server FQDN or YOUR name) []:[IP address of the server (Azure server) without port and 'https://']
Email Address []:[my personal yahoo email]
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:[empty]
An optional company name []:[empty]

应用托管在 Azure 服务器上。

我该如何解决?

【问题讨论】:

  • 证书有效吗?有没有可能是自签名证书?

标签: node.js azure https


【解决方案1】:

您正在使用导致验证失败的自签名证书。您需要获得签名证书才能消除验证错误。

【讨论】:

    猜你喜欢
    • 2016-06-13
    • 2011-07-07
    • 2018-10-20
    • 2013-06-17
    • 1970-01-01
    • 2016-09-23
    • 1970-01-01
    • 1970-01-01
    • 2021-12-14
    相关资源
    最近更新 更多