Client, Server and CA Certificate with OpenSSL
In this post, We will learn how to create CA key, CA certificate, server key, the server CSR and client key, the client CSR. We will also see how to create a client, server certificate and sign it with CA certificate with OpenSSL command on Ubuntu.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
In this post, We will learn how to create CA key, CA certificate, server key, the server CSR and client key, the client CSR. We will also see how to create a client, server certificate and sign it with CA certificate with OpenSSL command on Ubuntu.
Create the CA Key and Certificate for signing Client Certs
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
Create the Server Key, CSR, and Certificate
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
Self-sign the certificate with our CA cert
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt
Create the Client Key and CSR
openssl genrsa -des3 -out client.key 1024
openssl req -new -key client.key -out client.csr
Sign the client certificate with our CA cert
openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Comments
Post a Comment