任务片段
gmssl安装部署
gmssl搭建微型CA(单根CA层次模型)
对CA基本参数进行配置
mkdir certs clr newcerts private
touch index.txt
touch index.txt.attr
echo "01" > serial
构造根CA证书
gmssl ecparam -genkey -name sm2p256v1 -out Root.key
gmssl req -x509 -sm3 -days 3650 -key Root.key -out RootCA.crt
gmssl ecparam -genkey -name sm2p256v1 -out ca.key
gmssl req -new -sm3 -extensions v3_req -key ca.key -out ca.csr
gmssl ca -md sm3 -extensions v3_ca -in ca.csr -out ca.crt -days 1850 -cert RootCA.crt -keyfile Root.key
生成双证书
gmssl ca -md sm3 -in user.req -out user.crt -days 365 -cert ca.crt -keyfile ca.key
sudo vim /usr/local/gmssl/openssl.cnf
gmssl ecparam -genkey -name sm2p256v1 -text -out user.key
gmssl req -new -key user.key -out user.req
gmssl ca -md sm3 -in user.req -out user.crt -days 365 -cert ca.crt -keyfile ca.key
签名证书和加密证书
标签:系统安全,证书,ca,req,gmssl,user,key,out From: https://www.cnblogs.com/2012nxbjd/p/16972951.html