2015年11月5日木曜日

NetBSD の SSL Root 証明書

NetBSD で Git 使おうとしたらエラーになった。

$ git clone https://github.com/letsencrypt/letsencrypt
Cloning into 'letsencrypt'...
fatal: unable to access 'https://github.com/letsencrypt/letsencrypt/': SSL certificate problem: unable to get local issuer certificate

これは以下の理由によるらしい (引用 NetBSDあるある )。
SSLのRoot証明書がないため。NetBSDはSSLのRoot証明書は、pkgsrcから入れると便利。まず、mozilla-rootcertsをインストールする。

インストール後のメッセージを参考に、

$ sudo /usr/pkg/sbin/mozilla-rootcerts install

を実行したら、なんか大量に /etc/openssl/certs 以下にインストールされた。なお、/etc/openssl/certs が空でないと拒否られる。