Skip to content

Instantly share code, notes, and snippets.

@chayneps
chayneps / gen_client_cer.md
Last active December 23, 2019 21:38
Generate a client SSL certificate

Generate a client SSL certificate

  1. Generate a private key for the SSL client.
    openssl genrsa -out client.key 4096

  2. Use the client’s private key to generate a cert request.
    openssl req -new -key client.key -out client.req

  3. Issue the client certificate using the cert request and the CA cert/key.
    openssl x509 -req -in client.req -CA ca.cer -CAkey ca.key -set_serial 101 -extensions client -days 365 -outform PEM -out client.cer