Skip to content

Commit b7c9427

Browse files
committed
re-enabled HTTPS code in core.py, but wrapped it in a try ... except and added a print statement to suggest ^D if HTTPS is not needed/wanted...
1 parent f0a915c commit b7c9427

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,13 @@ def onAttend(key):
158158
if os.environ.get('INSECURE',False):
159159
reactor.listenTCP(10081, server.Site(sroot))
160160

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

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

0 commit comments

Comments
 (0)