- Boost C++ Library
- Crow C++ Web Framework
sudo su
openssl genpkey -algorithm RSA -out localhost.key
I am testing this certificate on Ubuntu localhost (127.0.0.1), so I named it "localhost.key".
Create a CSR file, which will be used to generate the self-signed certificate. Replace your_csr.csr with the desired name for your CSR file:
openssl req -new -key your_key.key -out localhost_csr.csr
when asked for Common Name you should typically be set to localhost for localhost testing.
Replace your_cert.crt with the desired name for your certificate file:
openssl x509 -req -days 365 -in localhost_csr.csr -signkey localhost.key -out localhost.crt
I am using localhost_csr.csr and localhost.key, which we previously generated.
Copy those two files to the root directory of your project.