Skip to content

Commit

Permalink
re-enabled HTTPS code in core.py, but wrapped it in a try ... except …
Browse files Browse the repository at this point in the history
…and added a print statement to suggest ^D if HTTPS is not needed/wanted...
  • Loading branch information
stighackvan committed Mar 19, 2011
1 parent f0a915c commit b7c9427
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core.py
Expand Up @@ -158,9 +158,13 @@ def onAttend(key):
if os.environ.get('INSECURE',False):
reactor.listenTCP(10081, server.Site(sroot))

# reactor.listenSSL(10443, server.Site(sroot), \
# secure.ServerContextFactory(myKey='certs/server.pem', trustedCA='certs/certificate_authority/shdh-ca.pem'))

print "just type ^D if you don't want to use the HTTPS port...it's optional..."
try:
reactor.listenSSL(10443, server.Site(sroot), \
secure.ServerContextFactory(myKey='certs/server.pem', trustedCA='certs/certificate_authority/shdh-ca.pem'))
except:
print "couldn't start SSL server... missing certs/server.pem???\n python says:", sys.exc_info()

reactor.listenTCP(10080, server.Site(iroot))

log.msg("It's a piece of cake to break a pretty snake. [SYSTEM ONLINE]")
Expand Down

0 comments on commit b7c9427

Please sign in to comment.