You should check what version of MAMP you have installed as well.
It's possible that the certificate bundle (/Applications/MAMP/Library/OpenSSL/cert.pem) hasn't been updated in a long time, and doesn't get automatically updated.
It's also possible that the version of MAMP you have has a too-old version of OpenSSL.
I am not trying that, it is just what the response is.
I am doing the code shared in a local MAMP PHP8 environment.
Nothing else is added to the code I shared in the opening comment, so I wouldn't know why this is done (and why it works with Amazon issued certs, or CF issued certs, but not LE issued certs).
The code I use is always the same, the response not.
Created 13 September 2021 at 17:08
But, that is just the file info. How could I check the actual cert date?
And again, I am kind of confused as of why this would only affect LE?
Isn't it using the same when certs are issued by CF or Amazon?
(Sorry, I am not that versed with these things, so it could be obvious )
This returns ./certs/cacert.pem:MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE
(thus, no result of that string in the actual cert.pem)
Assuming that file is the issue - any way to recreate it?
I would just delete it and re-run MAMP/cURL?
The root cert that Let's Encrypt uses by default expired at the end of Sept 2021.
[But updated systems are aware of the new ISRG Root X1 root cert, which the intermediate certificates in the chain link to in preference to the expired chain.]