[Bug]: Problem with certificate SSL
Platform
macOS
Operating system version
ventura 13.7.4
System architecture
Intel (x86)
Herd Version
1.22.1
PHP Version
7.4
Bug description
I installed the framework yii2, made a custom driver for it. Everything seemed to start. But the problem is when I connect the certificate to the site, it seems to have been installed. At the same time, when I go to some pages of the site where there are images that are loaded via PHP, it says that the certificate is invalid.
Steps to reproduce
No response
Relevant log output
I would also like to note that the certificate issue only works if the main version is 8.4; certificate issue does not work on 7.4.
Which URL are you trying to access? Is it a local one with a self-signed SSL certificate from Herd?
Yes, .test site from herd domain.
I've experienced a similar error when using file_get_contents which uses PHP's OpenSSL extension to find the Certificate Authority for sites generated by Herd.
It seems the OpenSSL extension looks in the cacert.pem (for me, found in "/Users/{username}/Library/Application Support/Herd/config/php/cacert.pem" for the Laravel Valet CA Self Signed CN certificate; this doesn't appear to be put there by Herd.
I can temporarily resolve the OpenSSL verify failed issue following these steps:
- Open KeyChain Access on your Mac.
- Search for "Laravel Valet CA Self Signed CN".
- File -> Export as PEM "Laravel Valet CA Self Signed CN.pem"
- Copy the contents of the file to your clipboard.
- Open the cacert.pem file linked to from your php.ini file (you can find the path by running php --ini). e.g.
"/Users/{username}/Library/Application Support/Herd/config/php/cacert.pem" - Paste the contents of the file at the end of the cacert.pem file and save
Thanks @LarsaSolidor , that seems to work.
@mpociot why is the Laravel Valet CA Self Signed CN certificate missing from the ca bundle?
@jason-nabooki hm that's a good question 🤔 Do you think that always adding this will cause any issues that we currently don't have?