Closed wahjrzd closed 2 years ago
可以参考如下命令 gmssl sm2keygen -pass 123456 -out cakey.pem -pubout capubkey.pem gmssl certgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN CA -days 365 -key cakey.pem -pass 123456 -out cacert.pem gmssl certparse -in cacert.pem
gmssl sm2keygen -pass 123456 -out signkey.pem -pubout signpubkey.pem gmssl reqgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN Alice -days 365 -key signkey.pem -pass 123456 -out signreq.pem gmssl reqsign -in signreq.pem -days 365 -key_usage digitalSignature -cacert cacert.pem -key cakey.pem -pass 123456 -out signcert.pem gmssl certparse -in signcert.pem
gmssl sm2keygen -pass 123456 -out enckey.pem -pubout encpubkey.pem gmssl reqgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN Alice -days 365 -key enckey.pem -pass 123456 -out encreq.pem gmssl reqsign -in encreq.pem -days 365 -key_usage digitalSignature -cacert cacert.pem -key cakey.pem -pass 123456 -out enccert.pem gmssl certparse -in enccert.pem
大致明白了^-^
可以参考如下命令 gmssl sm2keygen -pass 123456 -out cakey.pem -pubout capubkey.pem gmssl certgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN CA -days 365 -key cakey.pem -pass 123456 -out cacert.pem gmssl certparse -in cacert.pem
gmssl sm2keygen -pass 123456 -out signkey.pem -pubout signpubkey.pem gmssl reqgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN Alice -days 365 -key signkey.pem -pass 123456 -out signreq.pem gmssl reqsign -in signreq.pem -days 365 -key_usage digitalSignature -cacert cacert.pem -key cakey.pem -pass 123456 -out signcert.pem gmssl certparse -in signcert.pem
gmssl sm2keygen -pass 123456 -out enckey.pem -pubout encpubkey.pem gmssl reqgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN Alice -days 365 -key enckey.pem -pass 123456 -out encreq.pem gmssl reqsign -in encreq.pem -days 365 -key_usage digitalSignature -cacert cacert.pem -key cakey.pem -pass 123456 -out enccert.pem gmssl certparse -in enccert.pem