I suddenly get this nasty HTTPS error with PHP Composer and Composer used to work on my machine. There are already topics with the same issue on Github and also stackoverflo
I found a solution for this problem:
sudo apt-get purge ca-certificates
sudo apt-get install ca-certificates
composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.7.3
PHP version: 7.2.12
PHP binary path: /usr/bin/php7.2