Problem with pkg upgrade - certificate verification failed - SOLVED

I am running 14.5-RELEASE. When I run 'pkg upgrade', I now get a long series of error messages complaining about ssl certificate verification failures. I am currently unable to upgrade any packages.

# pkg upgrade 2>&1 | tee out
Updating FreeBSD repository catalogue...
Certificate verification failed for /CN=pkg.freebsd.org
10A0862BE62D0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:1890:
Certificate verification failed for /CN=pkg.freebsd.org
10A0862BE62D0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:1890:
...

The error message repeats many time. Full output is here https://termbin.com/ixwz

Does anyone know what has gone wrong?
 
Well, you were right, thanks for the hint. Chrony had stopped working for some reason and it was about 12 hours behind. Strange as it's been working for weeks. I switched over to ntpd and now everything is working again, the pkg upgrade now works. I noticed something was wrong with name service earlier too, it couldn't resolve certain names, although others worked normally. Perhaps a problem in the upstream nameservers (cloudflare). It's all working again now. I may have screwed up the chrony config of course. I'll leave it running on ntpd for the time being, I'll go back and check the chrony config when I have some time.
 
Back
Top