我对AWS ALB的curl命令不起作用
curl -v --cacert "/filepath/cert.pem" --cert "filepath/cert.pem:password" \
https://xxxxx.us-east-1.elb.amazonaws.com/xxxx/xxxx \
-H "Accept:application/json" \
-H "Content-Type:application/json" \
-H "Host:myhost.com"
给出以下错误:
HTTP/1.1 200 Connection established
* Proxy replied OK to CONNECT request
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /filepath/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to xxx.xxx.us-east-1.elb.amazonaws.com:443
* stopped the pause stream!
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to xxx.xxx.us-east-1.elb.amazonaws.com:443
我也做了echo | openssl s_client -connect xxx.xxxx.us-east-1.elb.amazonaws.com:443
openssl返回并验证返回码:0(确定)
我还验证了我的证书上的域名与alb侦听器中接受的域名匹配。知道我的请求有什么问题吗?
注意:我也尝试了不带--cacert选项,并得到了相同的结果。