Jan 6, 2012

How to generate a self-signed ssl certificate

openssl genrsa 1024 > stunnel.key
openssl req -new -x509 -nodes -sha1 -days 365 -key stunnel.key > stunnel.cert
cat stunnel.key stunnel.cert > stunnel.pem
dd if=/dev/urandom count=2 | openssl dhparam -rand - 512 > stunnel.pem
This generates a self-signed certificate which should be sufficient for testing purposes.
http://code.google.com/p/django-weave/wiki/HTTPSDevelopment

No comments: