quickly creating a self certificate using openssl

 

We can do this by running the following commands:-


Create a key

openssl genrsa -out mycert.key 2048

Create a csr

openssl req -new -key mycert.key -out mycert.csr

create a self signed certificate
openssl x509 -req -days 365 -in mycert.csr -signkey mycert.key -out mycert.crt

And finally validating it 

openssl x509 -in mycert.crt -text -noout

It is important to chain your certicate too. Otherwise it can hit some issues - for production certificate

cat mycert.key mycert.crt > mycert.pem



Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type