Summary
That short made me really troubled meanwhile😅
Environment
I have installed Drupal 8/9 on OpenBSD several times.
Drupal admin panel has the function to look up "Available updates" in "Report" pages.
I was in trouble because it always failed after those installations.
Solution
I found it was because of TLS connection failure, after struggling and being empowered by the official documentation:
To fix it, place cacert.pem
under chroot
's root and configure PHP aka php.ini
.
First, get the certificate.
$ # /etc in `chroot` is `/var/www/etc` in actual
$ cd /var/www/etc
$ doas mkdir ssl
$ cd ssl
$ # get the cacert.pem
$ doas ftp https://curl.haxx.se/ca/cacert.pem
$ doas chmod a-w cacert.pem
It looks like:
$ pwd
/var/www/etc/ssl
$ ls -l
total 448
-r--r--r-- 1 root daemon 206919 Apr 13 12:12 cacert.pem
Then, edit php.ini
.
$ doas nvim /etc/php-7.4.ini
to add the line:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
+ curl.cainfo = "/etc/ssl/cacert.pem"
Finally, restart the PHP-FPM daemon.
$ doas rcctl restart php74_fpm
Conclusion
Happily, my site got the update information🙂