summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorHans Hörberg <hans.horberg@umu.se>2015-11-06 12:25:59 +0100
committerHans Hörberg <hans.horberg@umu.se>2015-11-06 12:25:59 +0100
commit664503f3f8a92f53a807d31c1b77fae8a153a681 (patch)
treeac824c4ab21e53d478c327bad4b6e4966cd81c1d /example
parent3b84f65d849c2035636e1691ae0d35fe664640b9 (diff)
downloadpysaml2-664503f3f8a92f53a807d31c1b77fae8a153a681.tar.gz
Added configuration so the test sp can change sign and digest algorithm.
If SIGN_ALG = None DIGEST_ALG = None in service_conf sha1 will be used.
Diffstat (limited to 'example')
-rw-r--r--example/sp-wsgi/service_conf.py7
-rwxr-xr-xexample/sp-wsgi/sp.py3
2 files changed, 9 insertions, 1 deletions
diff --git a/example/sp-wsgi/service_conf.py b/example/sp-wsgi/service_conf.py
index 1d182617..b2461f2e 100644
--- a/example/sp-wsgi/service_conf.py
+++ b/example/sp-wsgi/service_conf.py
@@ -1,8 +1,13 @@
from saml2.assertion import Policy
+import saml2.xmldsig as ds
-HOST = '127.0.0.1'
+HOST = 'localhost'
PORT = 8087
HTTPS = False
+SIGN_ALG = None
+DIGEST_ALG = None
+#SIGN_ALG = ds.SIG_RSA_SHA512
+#DIGEST_ALG = ds.DIGEST_SHA512
# Which groups of entity categories to use
POLICY = Policy(
diff --git a/example/sp-wsgi/sp.py b/example/sp-wsgi/sp.py
index 94615750..9d216959 100755
--- a/example/sp-wsgi/sp.py
+++ b/example/sp-wsgi/sp.py
@@ -41,6 +41,7 @@ from saml2.s_utils import rndstr
#from srtest import exception_trace
from saml2.samlp import Extensions
from saml2 import xmldsig as ds
+import saml2.xmldsig as ds
logger = logging.getLogger("")
hdlr = logging.FileHandler('spx.log')
@@ -877,6 +878,8 @@ if __name__ == '__main__':
add_urls()
+ ds.DefaultSignature(service_conf.SIGN_ALG, service_conf.DIGEST_ALG)
+
SRV = wsgiserver.CherryPyWSGIServer((HOST, PORT), application)
_https = ""