手元の NanoPi NEO2 が、証明書エラーでどうしても https 通信が不可能に。

Ubuntu 16.04 なのでそれほど古いOSというわけではない。証明書関係だろうと思いいろいろやってみたがうまくいかず、これは他の原因ではないか?と思って date したら 2016 年だった。知らないうちにリブートして、RTC を持たないため時刻設定がまきもどったようだ。

$ sudo apt-get install  ca-certificates
$ sudo update-ca-certificates  -v
$ curl https://google.com                                                                                                             
curl: (60) server certificate verification failed. CAfile: ./cacert.pem CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

今後こういうことが起きないよう ntpd を入れた

sudo apt-get install ntp
  1. トップ
  2. tech
  3. https 通信が不可能な原因が時刻ずれ