How To Create A Self-Signed OpenSSL Certificate
By Bob Plankers on Aug 11, 2006 in System Administration
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!

1 Comment(s)
By nickyP on Oct 18, 2006 | Reply
One-liner (on linux):
openssl req -x509 -newkey rs:1024 -keyout my.key -out my.crt -days 2365 -nodes