openssl

https://qiita.com/hana_shin/items/6d9de0847a06d8ee95cc

# 証明書の確認
openssl s_client -connect domain.net:443 -showcerts

# 証明書の保存
openssl s_client -connect domain.net:443 -showcerts < /dev/null 2>/dev/null| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'> domain.net.pem