root@sclrdev:/home/sclr/certs/FreshCerts# curl --ftp-ssl --verbose ftp://{abc}/ -u trup:trup --cacert /etc/ssl/certs/ca-certificates.crt
* About to connect() to {abc} port 21 (#0)
* Trying {abc}...
* Connected to {abc} ({abc}) port 21 (#0)
< 220-Cerberus FTP Server - Home Edition
< 220-This is the UNLICENSED Home Edition and may be used for home, personal use only
< 220-Welcome to Cerberus FTP Server
< 220 Created by Cerberus, LLC
> AUTH SSL
< 234 Authentication method accepted
* successfully set certificate verify locations:
* CAfile: …Run Code Online (Sandbox Code Playgroud) 我正在使用cUrl和PHP向服务器发出请求(用于访问PayPal)
Paypal开发者网站从未提及使用PayPal访问API需要SSL证书,但是我用来请求令牌的代码如下:
$options = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_VERBOSE => 1,
CURLOPT_POSTFIELDS => $postvals,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSLVERSION => 3
);
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
echo curl_error($ch);
Run Code Online (Sandbox Code Playgroud)
此echo输出以下错误:
SSL certificate problem: unable to get local issuer certificate
Run Code Online (Sandbox Code Playgroud)
我的问题是:
1)如果我只需要获取用户电子邮件,是否需要SSL才能使用PayPal访问?
2)如果我不需要SSL,为什么会出现此错误?
PS:端点如下:https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/tokenservice
重新配置 PC 后,我无法正确使用 Docker,因为某些curl 命令由于 SSL/TLS 问题而被拒绝。
仅在一个示例中curl -vfsSL https://apt.releases.hashicorp.com/gpg返回以下错误:
* Trying 52.222.214.125:443...
* TCP_NODELAY set
* Connected to apt.releases.hashicorp.com (52.222.214.125) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* …Run Code Online (Sandbox Code Playgroud)