mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
Update Tools
This commit is contained in:
14
demos/certdemo.sh
Executable file
14
demos/certdemo.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# generate sm2 keypair and encrypt with password
|
||||
gmssl sm2keygen -pass 1234 -out sm2.pem -pubout sm2pub.pem
|
||||
|
||||
# generate a self-signed certificate
|
||||
gmssl certgen -C CN -ST Beijing -L Haidian -O PKU -OU CS -CN Alice -days 365 -key sm2.pem -pass 1234 \
|
||||
-key_usage "digitalSignature" -key_usage "keyCertSign" -key_usage cRLSign \
|
||||
-out cert.pem
|
||||
|
||||
gmssl certparse -in cert.pem
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user