Made it work better with Python3.5
This commit is contained in:
2
example/.gitignore
vendored
2
example/.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
idp/idp_conf.py
|
idp/idp_conf.py
|
||||||
idp2/idp.subject
|
idp2/idp.subject
|
||||||
idp2/idp_conf.py
|
idp2/test_idp_conf.py
|
||||||
sp/outstanding
|
sp/outstanding
|
||||||
sp/sp_conf.py
|
sp/sp_conf.py
|
||||||
server.crt
|
server.crt
|
||||||
|
@@ -7,11 +7,14 @@ import os
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from Cookie import SimpleCookie
|
#from Cookie import SimpleCookie
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
from urlparse import parse_qs
|
#from urlparse import parse_qs
|
||||||
from cherrypy import wsgiserver
|
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_HTTP_ARTIFACT
|
||||||
from saml2 import BINDING_URI
|
from saml2 import BINDING_URI
|
||||||
@@ -1088,10 +1091,13 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
_https = ""
|
_https = ""
|
||||||
if CONFIG.HTTPS:
|
if CONFIG.HTTPS:
|
||||||
SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(CONFIG.SERVER_CERT,
|
https = "using HTTPS"
|
||||||
CONFIG.SERVER_KEY,
|
# SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(
|
||||||
CONFIG.CERT_CHAIN)
|
# config.SERVER_CERT, config.SERVER_KEY, config.CERT_CHAIN)
|
||||||
_https = " using SSL/TLS"
|
SRV.ssl_adapter = BuiltinSSLAdapter(CONFIG.SERVER_CERT,
|
||||||
|
CONFIG.SERVER_KEY,
|
||||||
|
CONFIG.CERT_CHAIN)
|
||||||
|
|
||||||
logger.info("Server starting")
|
logger.info("Server starting")
|
||||||
print("IDP listening on %s:%s%s" % (HOST, PORT, _https))
|
print("IDP listening on %s:%s%s" % (HOST, PORT, _https))
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user