-
Generate a private key for the SSL client.
openssl genrsa -out client.key 4096 -
Use the client’s private key to generate a cert request.
openssl req -new -key client.key -out client.req -
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 -
Convert the client certificate and private key to pkcs#12 format for use by browsers.
openssl pkcs12 -export -inkey client.key -in client.cer -out client.p12 -
Clean up – remove the client private key, client cert and client request files as the pkcs12 has everything needed.
rm client.key client.cer client.req
Last active
December 23, 2019 21:38
-
-
Save chayneps/be7f460d8c88ccff12b877e8d7fb42d9 to your computer and use it in GitHub Desktop.
Generate a client SSL certificate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment