gmssl icon indicating copy to clipboard operation
gmssl copied to clipboard

公私钥怎么生成

Open YiqinXu opened this issue 3 years ago • 2 comments

您好,

我想问一下,除了demo里提供的公私钥,如果我想要自己生成程序能用的公私钥的话,应该怎么办呢。

谢谢

YiqinXu avatar Mar 30 '21 07:03 YiqinXu

您好,

我想问一下,除了demo里提供的公私钥,如果我想要自己生成程序能用的公私钥的话,应该怎么办呢。麻烦作者抽空回答下。

谢谢

huruzun avatar Jul 21 '21 11:07 huruzun

openssl ecparam -genkey -name SM2 -out priv.key openssl req -new -x509 -sha256 -key priv.key -out cer.crt -days 3650 -subj '/C=CN/ST=Hubei/L=Hongshan/O=CAD/OU=RND/CN=CAD/[email protected]'

#check openssl x509 -in cer.crt -noout -text

liaoweiguo avatar Jun 07 '22 03:06 liaoweiguo