Goal
Make client application such as web browser to trust our self signed certificate, so we can use any custom domain in development or internal network.
Generate Root CA
The first is to generate private key for our Certificate Authority (CA). Command below will generate RSA based private key 2048 bits key size.
$ mkdir self-root-ca && cd self-root-ca $ openssl genrsa -out myRootCA.key Generating RSA private key, 2048 bit long modulus .................+++ ................+++ e is 65537 (0x10001) $ chmod 0600 myRootCA.key
Command above will produce a file called myRootCA.key
. The chmod command will make sure that only super user and the creator of the key able to read the file.