Hacker News new | past | comments | ask | show | jobs | submit login

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



Or:

    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.


I 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


erm...chrome speech API?!? What exactly are you doing? and how can I do it too?


I'm doing: 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-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: