The CA.pl example script coming with OpenSSL has a couple of nice features (among lots of exceedingly ugly ones), namely -signcert: that one, slightly adjusted to eat real input files instead of this silly newcert.pem foolishness, can convert an existing cert into a req and does sign that afterwards.

Sweet. That allows me to quickly fix my "365 days only" blunder for my personal certs (used for email mostly): use old cert, old key, run CA.pl -signcert with a nice, 10 year validity and presto, new cert. (Even better would have been had I found out about that before I had replaced the CA cert - also too shortlived - with a completely new one...sigh.)

Don't forget to copy cert and key to the proper location (usually /etc/ssl/{certs,private}) and check that annoying symlink from keyid.0 to the cert. Fortunately it's the key id, not anything associated with the cert, so you don't have to redo this when your cert is redone. (I always forget how to produce the friggin hash: openssl x509 -hash -noout < cert is the necessary magic, or use c_rehash.)

stunnel expects both key and cert (PEM format) in a single file, and cat is your friend.

How am I using this stuff?

[ Mon 01.03.2004 21:48 | /mystuff | comment ]

Debian Silver Server Valid HTML 4.01! Valid CSS!
© Alexander Zangerl