I can’t remember OpenSSL options. Having grown tired of looking up how to create a self-signed certificate and finding lengthy tutorials I have opted to write my own. Three easy steps to having your own completely kinda-trustworthy certificate for testing and whatnot:
openssl genrsa -out bogus.key 1024
openssl req -new -key bogus.key -out bogus.csr
openssl x509 -req -days 365 -in bogus.csr
-signkey bogus.key -out bogus.crt
There, that was easy, wasn’t it?
Update: NickyP commented with a one-liner for this. That’s why I love blogs. Thank you!
One-liner (on linux):
openssl req -x509 -newkey rs:1024 -keyout my.key -out my.crt -days 2365 -nodes