You may not realize it, but yum
and dnf
require SSL certificates when communicating via secure HTTP (aka HTTPS). Have you checked the certificates under /etc/pki/tls/certs
? There should be at least two, for example:
/etc/pki/tls/certs# ls -l
total 4
lrwxrwxrwx 1 root root 49 Jan 30 12:48 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx 1 root root 55 Dec 11 13:19 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
If these links are missing you may be able to simply restore them. Otherwise, the files are part of the ca-certificates
package. You can obtain them from another server running your operating system via yumdownloader then restore your certificates from the resulting RPM file using yum --nogpgcheck localinstall
.