1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
This directory contains unit tests for M2Crypto.
You must first install M2Crypto, then cd into this directory, and
run the tests.
Invoke 'alltests.py' to execute all tests. Each test can also be run
individually.
Look also in the demo directory for other samples.
To create new test certificates:
mkdir certs
cd certs
Making the CA. You may want to use a locally edited openssl.cnf to
make sure that X509v3 Basic Constraints CA:TRUE gets set (by default
it will be false).
CA.sh -newca
cp demoCA/cacert.pem ../ca.pem
Making the server certificate and private key. make sure commonName
field is localhost.
CA.sh -newreq
CA.sh -sign
cp newcert.pem ../server.pem
openssl rsa <newkey.pem >>server.pem
Making the x509 certificate and key.
CA.sh -newreq
CA.sh -sign
cp newcert.pem ../x509.pem
openssl rsa <newkey.pem >>x509.pem
Making the signer certificate. Make sure the email address is
signer@example.com.
CA.sh -newreq
CA.sh -sign
cp newcert.pem ../signer.pem
openssl rsa <newkey.pem >signer_key.pem
Making the recipient certificate. Make sure the email address is
recipient@example.com.
CA.sh -newreq
CA.sh -sign
cp newcert.pem ../recipient.pem
openssl rsa <newkey.pem >recipient_key.pem
|