aheinecke@8: Testkeys were created with: aheinecke@8: openssl genrsa -out testkey-priv.pem 3072 aheinecke@8: openssl rsa -in testkey-priv.pem -out testkey-pub.pem -outform PEM -pubout aheinecke@8: aheinecke@8: aheinecke@8: Certificate List was created manually and contains: aheinecke@8: PCA-1-Verwaltung-08 aheinecke@8: Intevation-Email-CA-2013 aheinecke@8: Intevation-Server-CA-2010 aheinecke@8: aheinecke@42: Test files created with: aheinecke@8: aheinecke@30: echo -e S:$(openssl dgst -sha256 -sign testkey-priv.pem < list-valid.txt | base64 -w0)\\r > list-valid-signed.txt aheinecke@8: cat list-valid.txt >> list-valid-signed.txt aheinecke@42: echo -e S:$(openssl dgst -sha256 -sign testkey-other.pem < list-valid.txt | base64 -w0)\\r > list-valid-other-signature.txt aheinecke@42: cat list-valid.txt >> list-valid-other-signature.txt aheinecke@42: echo -e S:$(openssl dgst -sha1 -sign testkey-other.pem < list-valid.txt | base64 -w0)\\r > list-valid-sha1-signature.txt aheinecke@42: cat list-valid.txt >> list-valid-sha1-signature.txt aheinecke@8: cp list-valid-signed.txt list-invalid-signed.txt aheinecke@8: tail -1 list-valid.txt >> list-invalid-signed.txt aheinecke@8: andre@359: # To create test data for something you might want to release andre@359: andre@359: PRIVKEY=... andre@359: echo -e S:$(openssl dgst -sha256 -sign $PRIVKEY < list-valid.txt | base64 -w0)\\r > list-valid-signed-release.txt andre@359: cat list-valid.txt >> list-valid-signed-release.txt andre@359: aheinecke@42: # List with 0 created manually by placing a \0 in the signature aheinecke@42: aheinecke@43: # Test server certificate: aheinecke@43: aheinecke@43: gen_key type=ec ec_curve=brainpoolP256r1 filename=valid_ssl_bp.key aheinecke@43: cert_write issuer_name=CN=127.0.0.1,O=Intevation\\ Test,C=DE \ aheinecke@43: selfsign=1 issuer_key=valid_ssl_bp.key \ aheinecke@43: not_before=20130101000000 not_after=20301231235959 \ aheinecke@43: is_ca=1 max_pathlen=0 output_file=valid_ssl_bp.pem aheinecke@43: cat valid_ssl_bp.key >> valid_ssl_bp.pem aheinecke@43: aheinecke@43: gen_key filename=valid_ssl_rsa.key aheinecke@43: cert_write issuer_name=CN=127.0.0.1,O=Do_Not_Trust_Test,C=DE \ aheinecke@43: selfsign=1 issuer_key=valid_ssl_rsa.key \ aheinecke@43: not_before=20130101000000 not_after=20151231235959 \ aheinecke@43: is_ca=1 max_pathlen=0 output_file=valid_ssl_rsa.pem aheinecke@49: cat valid_ssl_rsa.key >> valid_ssl_rsa.pem aheinecke@43: aheinecke@234: # Test list certificates (using the rsa key) aheinecke@234: aheinecke@234: for i in {1..30} aheinecke@234: do aheinecke@234: gen_key filename=valid_ssl_rsa.key aheinecke@234: cert_write issuer_name=CN=TestRootCA$i,O=Do_Not_Trust_Test,C=DE \ aheinecke@234: selfsign=1 issuer_key=valid_ssl_rsa.key \ aheinecke@234: not_before=20130101000000 not_after=20151231235959 \ aheinecke@234: is_ca=1 max_pathlen=0 output_file=valid_ssl_rsa.pem aheinecke@234: CERT=$(cat valid_ssl_rsa.pem | grep -v "\-\-\-\-" | tr -d "\\n") aheinecke@234: echo -e I:${CERT}\\r >> list-valid.txt aheinecke@234: done aheinecke@234: aheinecke@234: for i in {1..15} aheinecke@234: do aheinecke@234: gen_key filename=valid_ssl_rsa.key aheinecke@234: cert_write issuer_name=CN=TestRootCADelete$i,O=Do_Not_Trust_Test,C=DE \ aheinecke@234: selfsign=1 issuer_key=valid_ssl_rsa.key \ aheinecke@234: not_before=20130101000000 not_after=20151231235959 \ aheinecke@234: is_ca=1 max_pathlen=0 output_file=valid_ssl_rsa.pem aheinecke@234: CERT=$(cat valid_ssl_rsa.pem | grep -v "\-\-\-\-" | tr -d "\\n") aheinecke@234: echo -e R:${CERT}\\r >> list-valid.txt aheinecke@234: done andre@300: andre@300: # NSS andre@300: mkdir nss andre@300: certutil -d nss -A -i valid_ssl_rsa.pem -n "test" -t c,C andre@300: certutil -d nss -D -n "test"