我安装了 optware,并且可以使用 curl。我试图让它在路由器重新启动时通知我(通过 pushover)。
curl \
-F "token=<token goes here>" \
-F "user=<user key goes here>" \
-F "message=ASUS Router WAN Up" \
https://api.pushover.net/1/messages
这是使用 Tomato 固件 1.28.0000 MIPSR2-097 K26 USB Mega-VPN 的华硕 RT-N16 路由器
错误消息表明这是安装的 CA 的问题:
url: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
那么安装 CA 包的推荐方法是什么?还是我应该变得不安全(-k 有效)?
如果您确实阅读了错误消息中的 URL,它将解释发生这种情况的原因以及您的选择。总结是你有两个选择:
--insecure
禁用检查的选项。cacert.pem
在系统的某处,并使用选项将 cURL 指向它--cacert
。