在 Linux 服务器上部署 CFCA(中国金融认证中心)SSL/TLS 证书,通常涉及生成私钥、创建 CSR(证书签名请求)、获取并安装由 CFCA 签发的证书文件。以下是详细的部署流程和注意事项。
CFCA 要求使用符合国密标准或国际通用标准的加密算法。若需支持国密 SM2 算法,请确保 OpenSSL 版本支持国密(如 OpenSSL 3.0+ 并启用国密补丁),否则默认使用 RSA。
# 生成 2048 位 RSA 私钥
openssl genrsa -out your_domain.key 2048
# 创建 CSR(填写组织信息时需与 CFCA 审核资料一致)
openssl req -new -key your_domain.key -out your_domain.csr
注意:对于 OV 或 EV 类型的 CFCA 证书,必须提供真实的企业信息,包括企业名称、注册地、域名等,以通过人工审核。
your_domain.crt:服务器证书ca-bundle.crt:中间证书链(可能包含多个 CA 证书)编辑虚拟主机配置文件(如 /etc/httpd/conf.d/ssl.conf):
<VirtualHost *:443>
ServerName www.yourdomain.com
SSLEngine on
SSLCertificateFile /path/to/your_domain.crt
SSLCertificateKeyFile /path/to/your_domain.key
SSLCertificateChainFile /path/to/ca-bundle.crt
</VirtualHost>
重启服务:
systemctl restart httpd
在 Nginx 配置中指定证书路径:
server {
listen 443 ssl;
server_name www.yourdomain.com;
ssl_certificate /path/to/your_domain.crt;
ssl_certificate_key /path/to/your_domain.key;
ssl_trusted_certificate /path/to/ca-bundle.crt;
# 推荐启用 TLS 1.2+ 和强加密套件
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256;
}
测试并重启:
nginx -t && systemctl restart nginx
将 PEM 转换为 PKCS#12 再导入 Java KeyStore:
openssl pkcs12 -export -in your_domain.crt -inkey your_domain.key \
-name "tomcat" -out domain.p12 -certfile ca-bundle.crt
keytool -importkeystore -deststorepass changeit -destkeystore keystore.jks \
-srckeystore domain.p12 -srcstoretype PKCS12 -srcstorepass your_password
更新 server.xml:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="/path/to/keystore.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
使用以下工具检查 HTTPS 是否正常运行:
curl -I https://www.yourdomain.com
openssl s_client -connect www.yourdomain.com:443 -servername www.yourdomain.com
或访问 SSL Labs 在线检测工具 进行全面评估。
| 产品名称 | 参考价格 | 适用场景 |
|---|---|---|
| 锐安信 vTrus DV SSL | 65 元 | 适用于个人博客或测试环境,自动化验证快速部署 |
| Sectigo DV SSL 证书 | 297 元 | 适用于中小型企业网站,兼容性广泛,性价比高 |
| DigiCert Secure Site OV SSL | 1800 元起 | 适用于中大型电商平台,提供企业身份标识与高级保障 |
更多 CFCA 证书选项 | DV/OV/EV 证书类型详解
提示:CFCA 证书广泛应用于国内金融行业,若系统要求符合《GM/T 0024-2014 SSL VPN 技术规范》,建议选用支持 SM2/SM3/SM4 国密算法的 CFCA 国密证书,并配合国密浏览器或国密网关使用。
如有国密改造需求,可联系专业服务商提供完整解决方案。
加密您的网站,赢得客户信任!