This commit is contained in:
Zhi Guan
2015-10-07 15:23:34 +08:00
parent 254a1266d6
commit b4ad0da508
27 changed files with 590 additions and 88 deletions

17
apps/ca-gencert.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash -x
CURVE=secp192k1
KEY_FILE=user.key
REQ_FILE=user.req
CERT_FILE=user.pem
#openssl ecparam -genkey -name $CURVE -text -out $KEY_FILE
openssl genrsa 1024 -text > $KEY_FILE
openssl req -new -key $KEY_FILE -out $REQ_FILE
openssl ca -out $CERT_FILE -outdir . -infiles $REQ_FILE
openssl pkcs12 -export -out user.pfx -in $CERT_FILE -inkey $KEY_FILE -certfile .demoCA/cacert.pem
#rm -f $KEY_FILE
#rm -f $REQ_FILE
#rm -f $CERT_FILE