I'm trying to curl a docker dev install from itself
using Magento\Framework\HTTP\Client\Curl
I get a failure and the result SSL certificate problem: self signed certificate
Got the options set
$this->curl->setOption(CURLOPT_SSL_VERIFYHOST, 0);
$this->curl->setOption(CURLOPT_SSL_VERIFYPEER, 0);
Because it's local/docker I can't resolve the host
Therefore using CURLOPT_PROXY. Syntax looks like this: https://web.magento2.docker:443
Also tried this option: CURLOPT_HTTPPROXYTUNNEL
If I tail nginx logs they look like this
2020/06/21 23:41:48 [info] 16#16: *75 SSL_do_handshake() failed (SSL: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:SSL alert number 48) while SSL handshaking, client: 172.27.0.3, server: 0.0.0.0:443
Has anyone experienced similar issue and got workaround?
On command line I can use this curl https://web.magento2.docker --insecure
curl https://web.magento2.docker --insecure
behaviour using the magentoMagento\Framework\HTTP\Client\Curl
logic – Dominic Xigen Jun 23 '20 at 8:46