To setup TLS/SSL for web servers, X.509 client authentication, or even for database servers, you need to have certificate files. The quickest way to generate them, assuming you are on MacOS/Linux, is with certie.
Installing certie is simple:
sudo gem install certie
Following the installation, generating the certificates is as simple as:
This creates a root certificate and a server certificate in PEM format within the current directory.
You may want to change the subject prefix by editing the ".certie_subjprefix" file in your home directory. Note that if you change the subject prefix, you would need to start over (delete the contents of the current directory, or create a new directory).
If you were unable to successfully execute "gem install certie" above, you likely need to install Ruby and OpenSSL dependencies.
If you are on RedHat, you may need to install build tools and Ruby:
sudo yum groupinstall -y "Development Tools" sudo yum install -y ruby-devel openssl-devel
For Ubuntu/Debian, the dependencies are installed with:
sudo apt install -y ruby-dev libssl-dev build-essential