Skip to content

Instantly share code, notes, and snippets.

View iifawzi's full-sized avatar
🎯
Focusing

Fawzi Essam iifawzi

🎯
Focusing
  • Wallapop
  • Barcelona, Spain
View GitHub Profile
@iifawzi
iifawzi / generate-mongo-ssl.md
Created October 26, 2022 12:27 — forked from achesco/generate-mongo-ssl.md
Generate self-signed SSL certificates for MongoDb server and client

CNs are important!!! -days 3650

Make PEM containig a public key certificate and its associated private key

openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/[email protected]/CN=localhost' -out mongodb-cert.crt -keyout mongodb-cert.key
cat mongodb-cert.key mongodb-cert.crt > mongodb.pem