github.com/macb/etcd@v0.3.1-0.20140227003422-a60481c6b1a0/fixtures/ca/broken/README (about) 1 ## Testing x509 certs for luvit 2 3 # Make the CA cert 4 openssl genrsa -out ca.key 4096 5 openssl req -new -x509 -days 365 -key ca.key -out ca.crt 6 7 # Make server cert and signing request 8 openssl genrsa -out server.key 4096 9 openssl req -new -key server.key -out server.csr 10 11 # Sign the server csr and generate a crt 12 openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt 13 14 # Output unencrypted server key 15 openssl rsa -in server.key -out server.key.insecure 16 17 # Output "raw" public key from server crt 18 openssl x509 -pubkey -noout -in server.crt > server.pub 19 20 # Sign the public key with the key (just for testing signatures) 21 openssl dgst -sign server.key.insecure -sha256 server.pub > server.pub.sig