Score:0

Problem with certificates, reinstall didn't help

me flag

I am using Ubuntu 20.04 and I have problems with ca-certificates. When I run command sudo apt update, I receive a lot of errors like:

Certificate verification failed: The certificate is NOT trusted. 
The certificate issuer is unknown.
Could not handshake: Error in the certificate verification

Or when I run curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh (or with -k option),

I receive

curl: (77) error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs

I tried followings without success:

sudo apt-get install --reinstall ca-certificates
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

Interestingly, I discovered that half of the /etc/ssl/certs/ca-certificates.crt file has normal line-ending, other half has different line-endings.

First half of ca-certificates.crt:

enter image description here

Second half of ca-certificates.crt:

enter image description here

I correct the file with dos2unix but I am getting still errors.

What is the root cause of the issue and the solution?

Thanks.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.