The error message indicates the connection is allowed but your VPS server does not trust the Canonical server's certificate.
A good first step is to make sure the root certificates are up to date on your VPS server.
apt-get update
apt-get install ca-certificates
Using curl
is a simple way to test. If this command fails with output that includes SSL certificate problem
then that would confirm the certificate issue.
curl -vs https://contracts.canonical.com
You can also use the -k
option with curl
to ignore certificate errors and learn more about what certificate the VPS server is receiving.
curl -vsk https://contracts.canonical.com -o /dev/null
EDIT
Your curl
output does suggest that the Canonical server's certificate is trusted. Your VPS server can reach the Canonical server and nothing appears to be interfering with the traffic.
These are a couple of other commands you can try, although they usually are not necessary to run manually.
update-ca-certificates
c_rehash /etc/ssl/certs
When I strace
a ua
command it appears to be specifically looking for the file /usr/lib/ssl/certs/4042bcee.0
. You can also verify this exists and is a symlink to the root certificate. This symlink gets created by the c_rehash
command.
# ls -l /usr/lib/ssl/certs/4042bcee.0
lrwxrwxrwx 1 root root 16 Feb 19 14:09 /usr/lib/ssl/certs/4042bcee.0 -> ISRG_Root_X1.pem
EDIT 2
From your comment it sounds like the /usr/lib/ssl/
directory may be messed up. It should contain several symlinks
$ ls -l /usr/lib/ssl/
total 4
lrwxrwxrwx 1 root root 14 Apr 15 2016 certs -> /etc/ssl/certs
drwxr-xr-x 2 root root 4096 Feb 19 14:10 misc
lrwxrwxrwx 1 root root 20 Feb 17 10:21 openssl.cnf -> /etc/ssl/openssl.cnf
lrwxrwxrwx 1 root root 16 Apr 15 2016 private -> /etc/ssl/private