I recently started getting errors when working with WP cli on the command line, but also PHP seems to be having the same issue. I'm not sure if this would be an OpenSSL issue and it not looking in the correct location for the public certificates:
Note: I'm seeing the same issue on two separate servers running these versions of CentOS and cPanel/WHM.
Code:
Error: Failed to get url 'https://api.wordpress.org/core/checksums/1.0/?version=5.3.2&locale=en_US': cURL error 60: SSL: no alternative certificate subject name matches target host name 'api.wordpress.org'.