Openssl – Usefull commands

Published on Author gryzliLeave a comment

Usefull commands for generating SSL Keys, CSR’s and certificates using Openssl tool.


Working with SSL Private Keys


Generate unencrypted private key without password


Generate(BATCH) encrypted private key with password  from password file


Working with SSL CSR’s [.csr]  (Certificate Signing Requests)

Creating CSR.conf for CSR generation automation

Creating your own CSR config, allows you to predefine default values, field constraints and hints, which will be used later for CSR generation.

Also by having predefined default values, you can batch create your CSR with appropriate values

# vim csr.conf


Generate new CSR by using already existing key


Read existing CSR file


Working with SSL Certificates [.crt]

Generate SSL Certificate from existing CSR and Key

 Check if existing SSL certificate matches existing Key file



Automation of different SSL related tasks

Batch creation of SSL Key and Certificate

This is a one-liner for creation of self-signed SSL key and SSL Certificate:


“The worst page in the universe”

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.