wolfssl-w32/certs/sm2/gen-sm2-keys.sh

17 lines
359 B
Bash
Executable file

#!/bin/sh
for key in root ca server client
do
openssl genpkey -algorithm sm2 > ${key}-sm2-priv.pem
openssl pkey -in ${key}-sm2-priv.pem -outform DER -out ${key}-sm2-priv.der
openssl pkey -in ${key}-sm2-priv.pem -outform PEM -pubout -out ${key}-sm2-key.pem
openssl pkey -in ${key}-sm2-priv.pem -outform DER -pubout -out ${key}-sm2-key.der
done