diff options
author | Roland Hedberg <roland@catalogix.se> | 2016-05-17 17:27:35 +0200 |
---|---|---|
committer | Roland Hedberg <roland@catalogix.se> | 2016-05-17 17:27:35 +0200 |
commit | 9a75469864ace1ece7da9d7a80584d4396a378a8 (patch) | |
tree | 48d447874a0c60a1ffb094038b8995f47b4b70cc /example | |
parent | 255c34e334c41bf1b115caa03531504af66db504 (diff) | |
download | pysaml2-9a75469864ace1ece7da9d7a80584d4396a378a8.tar.gz |
Made it work better with Python3.5
Diffstat (limited to 'example')
-rw-r--r-- | example/.gitignore | 2 | ||||
-rwxr-xr-x | example/idp2/idp.py | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/example/.gitignore b/example/.gitignore index 4fcc7ec6..904fe3fc 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -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 diff --git a/example/idp2/idp.py b/example/idp2/idp.py index aca316c2..af8644f0 100755 --- a/example/idp2/idp.py +++ b/example/idp2/idp.py @@ -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: |