| 1 |
This directory contains basic self signed test certificates for use by |
| 2 |
proton examples. |
| 3 |
|
| 4 |
The ".pem" files are in the format expected by proton implementations |
| 5 |
using OpenSSL. The ".p12" file are for Windows implementations using |
| 6 |
SChannel. |
| 7 |
|
| 8 |
The commands used to generate the certificates follow. |
| 9 |
|
| 10 |
|
| 11 |
make_pn_cert() |
| 12 |
{ |
| 13 |
name=$1 |
| 14 |
subject=$2 |
| 15 |
passwd=$3 |
| 16 |
# create the pem files |
| 17 |
openssl req -newkey rsa:2048 -keyout $name-private-key.pem -out $name-certificate.pem -subj $subject -passout pass:$passwd -x509 -days 3650 |
| 18 |
# create the p12 files |
| 19 |
openssl pkcs12 -export -out $name-full.p12 -passin pass:$passwd -passout pass:$passwd -inkey $name-private-key.pem -in $name-certificate.pem -name $name |
| 20 |
openssl pkcs12 -export -out $name-certificate.p12 -in $name-certificate.pem -name $name -nokeys -passout pass: |
| 21 |
} |
| 22 |
|
| 23 |
make_pn_cert tserver /CN=test_server/OU=proton_test tserverpw |
| 24 |
make_pn_cert tclient /CN=test_client/OU=proton_test tclientpw |