OpenBSD pkg_add didn't work due to ocsp verify failed
- Infrastructure and operations
- Published
- 2 min read
- @nabbisen
Table of contents
What happened What happened
Just after installing OpenBSD (opens in a new tab) onto VirtualBox (opens in a new tab), I couldn’t use syspatch and pkg_add due to the error:
$ doas pkg_add -u
https://cdn.openbsd.org/pub/OpenBSD/7.0/packages-stable/amd64/: TLS handshake failure: ocsp verify failed: ocsp response not current
https://cdn.openbsd.org/pub/OpenBSD/7.0/packages/amd64/: TLS handshake failure: ocsp verify failed: ocsp response not current
https://cdn.openbsd.org/pub/OpenBSD/7.0/packages/amd64/: empty
Nevertheless ping cdn.openbsd.org was successful.
Solution Solution
I modified /etc/installurl:
$ doas vi /etc/installurl
to switch to the FTP server:
- https://cdn.openbsd.org/pub/OpenBSD
+ https://ftp.openbsd.org/pub/OpenBSD
Then it turned successful.
$ doas pkg_add -u
quirks-4.54 signed on 2022-02-12T18:54:43Z
quirks-4.54: ok
Why happened (guess) Why happened (guess)
After a while (an hour), I reverted /etc/installurl:
- https://ftp.openbsd.org/pub/OpenBSD
+ https://cdn.openbsd.org/pub/OpenBSD
It didn’t bring any error:
$ doas pkg_add -u
quirks-4.54 signed on 2022-02-12T18:54:43Z
To my surprise, It may have been fixed over time. Apart from it, the first success may have done.
I guess it was because ntp status. I perhaps had never met the failure when installing OpenBSD onto physical server.
For information, the ntp status was below after the failure had been fixed:
$ doas ntpctl -s status
5/5 peers valid, constraint offset -32564s, clock unsynced, clock offset is -32561707.819ms
A sequel A sequel
I wrote a post about the real reason discovered a few days later.
More on: Containers and virtual machines
-
This post shows how to install Docker and run vm on Devuan, a systemd-free fork of Debian.
-
With VirtualBox 7.0, installing OpenBSD 🐡 7.3 as guest on Artix Linux 🐧 as host failed.
-
It is not so difficult to install Podman on Artix Linux, based on Arch Linux and systemd-free.
OBSD Solutions
OBSD Solutions: OpenBSD consulting and support by Scqr, Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.