chrome 自签名证书
If your website uses a self-signed certificates, Chrome will show a warning every time and you need clicks to continue. In this post, I will introduce how to make Chrome accept self-signed certificates for sites on Linux.
如果您的网站使用自签名证书,则Chrome每次都会显示警告,您需要单击以继续。 在本文中,我将介绍如何使Chrome接受Linux上站点的自签名证书。
This post is made short on purpose and you need to search the Web and learn if you want to understand the stuff.
这篇文章的目的是简短的,您需要搜索网络并了解您是否想了解这些内容。
You will need libnss3-tools
package on Debian/Ubuntu/Linux Mint or nss-tools
on CentOS/Fedora/RHEL. Then use this script (add-cert.bash):
您将需要Debian / Ubuntu / Linux Mint上的libnss3- tools
包或CentOS / Fedora / RHEL上的nss-tools
。 然后使用此脚本(add-cert.bash):
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $0 hostname"
exit 1
fi
hostname=$1
echo QUIT \
| openssl s_client -servername $hostname -connect $hostname:443 -showcerts 2>null \
| sed -ne '/BEGIN CERT/,/END CERT/p' \
>/tmp/cert-$hostname
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n $hostname -i /tmp/cert-$hostname
certutil -d sql:$HOME/.pki/nssdb -L
like
喜欢
bash add-cert.bash your.web.site
After the certificate is added, restart Chrome and you should find no warnings any more.
添加证书后,重新启动Chrome,您应该再也不会看到警告。
翻译自: https://www.systutorials.com/making-chrome-accept-self-signed-certificates-on-linux/
chrome 自签名证书