github.com/macb/etcd@v0.3.1-0.20140227003422-a60481c6b1a0/fixtures/ca/README (about)

     1  Testing x509 certs for etcd
     2  
     3  The passphrases for the keys are `asdf`.
     4  
     5  # Make the CA cert
     6  openssl genrsa -des3 -out ca.key 4096
     7  openssl req -new -x509 -days 365 -key ca.key -out ca.crt  -config openssl.cnf -extensions v3_ca
     8  
     9  # Make server cert and signing request
    10  openssl genrsa -des3 -out server.key 4096
    11  openssl req -new -key server.key -out server.csr  -config openssl.cnf
    12  
    13  # Sign the server csr and generate a crt
    14  openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt -extfile openssl.cnf -extensions v3_req
    15  
    16  # Output unencrypted server key
    17  openssl rsa -in server.key -out server.key.insecure
    18  
    19  # Output "raw" public key from server crt
    20  openssl x509 -pubkey -noout -in server.crt > server.pub
    21