You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
402 B

#!/bin/bash
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
-keyout privatekey.pem -out publickey.pem \
-subj "/CN=unit-tests"
openssl pkcs12 -export -out privatekey.p12 \
-inkey privatekey.pem -in publickey.pem \
-name "key" -passout pass:notasecret
openssl pkcs12 -in privatekey.p12 \
-nodes -nocerts -passout pass:notasecret \
-passin pass:notasecret > pem_from_pkcs12.pem