diff options
Diffstat (limited to 'tests/auto/network/ssl/qsslkey/keys/genkeys.sh')
-rwxr-xr-x | tests/auto/network/ssl/qsslkey/keys/genkeys.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh index c9f2406cad..279e71e561 100755 --- a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh +++ b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh @@ -72,3 +72,25 @@ do echo -e "\ngenerating DSA public key to DER file ..." openssl dsa -in dsa-pri-$size.pem -pubout -out dsa-pub-$size.der -outform DER done + +#--- EC ---------------------------------------------------------------------------- +# Note: EC will be generated with pre-defined curves. You can check supported curves +# with openssl ecparam -list_curves. +# If OpenSSL 1.0.2 is available brainpool should be added! +# brainpoolP256r1 brainpoolP384r1 brainpoolP512r1 +for curve in secp224r1 prime256v1 secp384r1 +do + size=`tr -cd 0-9 <<< $curve` + size=${size::-1} # remove last number of curve name as we need bit size only + echo -e "\ngenerating EC private key to PEM file ..." + openssl ecparam -name $curve -genkey -noout -out ec-pri-$size-$curve.pem + + echo -e "\ngenerating EC private key to DER file ..." + openssl ec -in ec-pri-$size-$curve.pem -out ec-pri-$size-$curve.der -outform DER + + echo -e "\ngenerating EC public key to PEM file ..." + openssl ec -in ec-pri-$size-$curve.pem -pubout -out ec-pub-$size-$curve.pem + + echo -e "\ngenerating EC public key to DER file ..." + openssl ec -in ec-pri-$size-$curve.pem -pubout -out ec-pub-$size-$curve.der -outform DER +done |