每当我使用 curl 并收到错误 60(SSL 证书问题)时,它也会向我显示一大堆文字:
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.
我怎样才能只隐藏这堵文字墙?
最佳答案
如果您只想抑制警告,请使用以下标志:
-s, --silent
如果您想在证书问题的情况下连接到服务器,请使用以下标志:
-k(或--不安全)
关于linux - curl - 禁止证书验证错误文本,而不是错误本身,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69811984/