After system boot and login, any attempt to use pkg triggers the bootstrap process. When accepting the bootstrap prompt (answering 'Y'), pkg fails with repeated SSL certificate verification errors when attempting to fetch from pkg.FreeBSD.org. All SSL/TLS connections to FreeBSD package repositories fail with certificate verification errors for Let's Encrypt certificates. (networking is functional while running the command) Console log: root@freebsd-15:~ # pkg bootstrap The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/quarterly, please wait... Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: pkg: Error fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/quarterly/Latest/pkg.pkg: Authentication error A pre-built version of pkg could not be found for your system. Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_quarterly_0, please wait... Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 10A0E506B94F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:2124: pkg: Error fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_quarterly_0/Latest/pkg.pkg: Authentication error A pre-built version of pkg could not be found for your system.
Can you provide additional steps to reproduce? Are the system date and time correct? Thanks. root@clean:~ # echo $SHELL /bin/tcsh root@clean:~ # pkg -v ; uname -mvKU 2.3.1 FreeBSD 15.0-BETA2 releng/15.0-n280713-7cd9d3fe838c GENERIC amd64 1500067 1500067 root@clean:~ # pkg delete -fqy pkg root@clean:~ # pkg bootstrap The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Installing pkg-2.3.1... Extracting pkg-2.3.1: 100% root@clean:~ #
In addition to Graham's questions above, can you tell me how this system was installed? From distribution sets, from pkgbase, using the "live" VM image we ship...?
This is from FreeBSD-15.0-BETA2-amd64-BASIC-CLOUDINIT-ufs.raw.xz, let me try again and check the date...
Date is ok, fetch could not use https at all, then I ran "certctl rehash" and it got back in shape! Now pkg bootstrap works too.
"/usr/sbin/certctl rehash" in user-data makes https work after boot.
I think this will be fixed by https://reviews.freebsd.org/D53263 .
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=fa240b7ff081a49d44e0941b2090e5dc5838fe60 commit fa240b7ff081a49d44e0941b2090e5dc5838fe60 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-10-22 23:14:35 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-10-22 23:14:47 +0000 packages: Update the METALOG when (un)installing the caroot package There may be other issues here but this change certainly seems to be necessary. PR: 290394 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53263 release/packages/ucl/caroot.ucl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8b4585444728ca241d09cd230a3b8e27e3954847 commit 8b4585444728ca241d09cd230a3b8e27e3954847 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-10-22 23:14:35 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-10-23 23:36:09 +0000 packages: Update the METALOG when (un)installing the caroot package There may be other issues here but this change certainly seems to be necessary. PR: 290394 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53263 (cherry picked from commit fa240b7ff081a49d44e0941b2090e5dc5838fe60) release/packages/ucl/caroot.ucl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
A commit in branch releng/15.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a6538240790f367badad30bba70a7282529cb0c1 commit a6538240790f367badad30bba70a7282529cb0c1 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-10-22 23:14:35 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-10-23 23:36:32 +0000 packages: Update the METALOG when (un)installing the caroot package There may be other issues here but this change certainly seems to be necessary. Approved by: re (cperciva) PR: 290394 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53263 (cherry picked from commit fa240b7ff081a49d44e0941b2090e5dc5838fe60) (cherry picked from commit 8b4585444728ca241d09cd230a3b8e27e3954847) release/packages/ucl/caroot.ucl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Good to go in 15.0-BETA3 images \o/