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:, server:

Has anyone experienced similar issue and got workaround?

On command line I can use this curl https://web.magento2.docker --insecure

  • In summary I can't see to recreate the curl https://web.magento2.docker --insecure behaviour using the magento Magento\Framework\HTTP\Client\Curl logic – Dominic Xigen Jun 23 '20 at 8:46

Do you have a valid SSL certificate installed for your site? If you're using a self-signed one, try using Chrome instead of Firefox and accept and proceed when it warns about the security issue.

Another option if you do not need / have an SSL certificate is to set Magento to not use SSL in the admin section:

System -> Configuration -> Web -> "Secure" (Use Secure URLs in Admin -> No)

  • Yep local docker install - so self signed certificate. Using curl in command line - no browser. I was hoping to work through the issue rather than configure around it. Plus good practice for when working through an actual proxy – Dominic Xigen Jun 22 '20 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.