Generating a root CA certificate
We will create some needed directories and files and then proceed with generating the root CA certificate:
- First, we will make the
mini-ca
directory where we will put all our CA-related files:$ mkdir mini-ca $ cd mini-ca
- Inside the
mini-ca
directory, we will create theroot
directory for the files related to the root CA:$ mkdir root $ cd root
- Inside the
root
directory, we will create a directory for issued certificates, a certificate index file, and a CRL number file:$ mkdir issued $ echo -n >index.txt $ echo 01 >crlnumber.txt
- Now, we have to make a config file for our root CA; we will name this file
root.cnf
. We will start the config file with some mandatory parameters:[ca] default_ca = CA_default [CA_default] database = index.txt new_certs_dir = issued certificate...