RSS Feed for This PostCurrent Article

How To Create A Self-Signed OpenSSL Certificate

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!

| Comments

Trackback URL

  1. 1 Comment(s)

  2. 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

  1. 1 Trackback(s)

  2. Aug 15, 2006: Coding Room

Post a Comment

 

Please note that while in principle I don't mind promotion of a non-personal web site or blog in the fields below, any comments that are off-topic, derogatory, or spam-like will likely be removed at my discretion.