3 ms·
Or for https (e.g. when developing for Chrome's speech recognition API): twistd --nodaemon web --path=. -c snakeoil.crt -k snakeoil.key --https=8443 And t
by gmac 13y ago
Or for https (e.g. when developing for Chrome's speech recognition API):
twistd --nodaemon web --path=. -c snakeoil.crt -k snakeoil.key --https=8443
And to generate a 100-year localhost key/cert for use with this:
openssl genrsa -passout pass:dummy -out snakeoil.secure.key 1024
openssl rsa -passin pass:dummy -in snakeoil.secure.key -out snakeoil.key
openssl req -new -subj "/commonName=localhost" -key snakeoil.key -out snakeoil.csr
openssl x509 -req -days 36500 -in snakeoil.csr -signkey snakeoil.key -out snakeoil.crt
- e12e 13y agoOr: cat /etc/certs/ssl-cert-snakeoil.pem \ /etc/priv/ssl-cert-snakeoil.key >> \ /etc/priv/ssl-cert-and-key-snakeoil.pem chmod og-rwx /etc/priv/ssl-cert-and-key-snakeoil.pem #note instructions above on how to generate a fresh #self-signed cert python3 -m http.server 8000 & stunnel -p /etc/ssl/private/ssl-cert-and-key-snakeoil.pem -r 8000 -d 4430 Which does require stunnel, in addition to python, obviously.
- gmac 13y agoI can't edit my original comment now, but thought I should add this for cleanup after key/cert generation: rm snakeoil.secure.key snakeoil.csr
- Sven7 13y agoerm...chrome speech API?!? What exactly are you doing? and how can I do it too?
- gmac 13y agoI'm doing: https://github.com/jawj/pigeonsim https://github.com/jawj/pigeonsim (now with speech recognition + geocoding, supporting a beam-me-up gesture). Web speech API: http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-...