Made it work better with Python3.5

This commit is contained in:
Roland Hedberg
2016-05-17 17:27:35 +02:00
parent 255c34e334
commit 9a75469864
2 changed files with 14 additions and 8 deletions

2
example/.gitignore vendored
View File

@@ -1,6 +1,6 @@
idp/idp_conf.py
idp2/idp.subject
idp2/idp_conf.py
idp2/test_idp_conf.py
sp/outstanding
sp/sp_conf.py
server.crt

View File

@@ -7,11 +7,14 @@ import os
import re
import time
from Cookie import SimpleCookie
#from Cookie import SimpleCookie
from hashlib import sha1
from urlparse import parse_qs
#from urlparse import parse_qs
from cherrypy import wsgiserver
from cherrypy.wsgiserver import ssl_pyopenssl
#from cherrypy.wsgiserver import ssl_pyopenssl
from cherrypy.wsgiserver.ssl_builtin import BuiltinSSLAdapter
from future.backports.http.cookies import SimpleCookie
from future.backports.urllib.parse import parse_qs
from saml2 import BINDING_HTTP_ARTIFACT
from saml2 import BINDING_URI
@@ -1088,10 +1091,13 @@ if __name__ == '__main__':
_https = ""
if CONFIG.HTTPS:
SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(CONFIG.SERVER_CERT,
CONFIG.SERVER_KEY,
CONFIG.CERT_CHAIN)
_https = " using SSL/TLS"
https = "using HTTPS"
# SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(
# config.SERVER_CERT, config.SERVER_KEY, config.CERT_CHAIN)
SRV.ssl_adapter = BuiltinSSLAdapter(CONFIG.SERVER_CERT,
CONFIG.SERVER_KEY,
CONFIG.CERT_CHAIN)
logger.info("Server starting")
print("IDP listening on %s:%s%s" % (HOST, PORT, _https))
try: