stewart/dotcss — pull request #8 by repeatingbeats (2013-02-27 23:50:45+00:00)
Title: Adds localhost SSL support

This patch adds a self-signed certificate for localhost to avoid serving mixed content on https host pages. It is a near-replica of the corresponding [dotjs commit](https://github.com/defunkt/dotjs/commit/130d106e732331ed46b580cd2c94169e0fb55aff), so I can it's mostly copy/paste other than the certificate itself.

I generated the certificate with the following steps, [cribbed from here]:(http://www.akadia.com/services/ssh_test_certificate.html)
```bash
# generate server key
➜ openssl genrsa -des3 -out server.key 1024
# remove passphrase
➜ mv server.key server.key.orig
➜ openssl rsa -in server.key.org -out server.key
# generate csr
➜ openssl req -new -key server.key -out server.csr
# generate cert
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
# copy contents to clipboard for pasting to dcssd
➜ cat server.crt server.key | pbcopy
```
I've omitted additions to the readme and install rake task. To get this to work across browser restarts on OS X, I needed to [add the self-signed certificate to my system keychain](http://www.robpeck.com/blog/2010/10/05/google-chrome-mac-os-x-and-self-signed-ssl-certificates/). The dotjs documentation just directs users to visit the https://localhost:port in their browser to authorize the cert, but this did not work across browser restarts for me.

I think additions to aid installation are necessary, but wanted to get feedback on the patch before working on docs. Additionally, there are some manifest changes required to get the extension to install in Chrome. [See this fork](https://github.com/stewart/dotcss/compare/master...marksands:master).