File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 51
51
from idp_user import USERS
52
52
from idp_user import EXTRA
53
53
from mako .lookup import TemplateLookup
54
+ import saml2 .xmldsig as ds
54
55
55
56
logger = logging .getLogger ("saml2.idp" )
56
57
logger .setLevel (logging .WARNING )
@@ -1067,6 +1068,18 @@ def application(environ, start_response):
1067
1068
HOST = CONFIG .HOST
1068
1069
PORT = CONFIG .PORT
1069
1070
1071
+ sign_alg = None
1072
+ digest_alg = None
1073
+ try :
1074
+ sign_alg = CONFIG .SIGN_ALG
1075
+ except :
1076
+ pass
1077
+ try :
1078
+ digest_alg = CONFIG .DIGEST_ALG
1079
+ except :
1080
+ pass
1081
+ ds .DefaultSignature (sign_alg , digest_alg )
1082
+
1070
1083
SRV = wsgiserver .CherryPyWSGIServer ((HOST , PORT ), application )
1071
1084
1072
1085
_https = ""
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ from saml2.saml import NAME_FORMAT_URI
8
8
from saml2 .saml import NAMEID_FORMAT_TRANSIENT
9
9
from saml2 .saml import NAMEID_FORMAT_PERSISTENT
10
10
import os .path
11
+ import saml2 .xmldsig as ds
11
12
12
13
try :
13
14
from saml2 .sigver import get_xmlsec_binary
39
40
SERVER_CERT = "pki/mycert.pem"
40
41
SERVER_KEY = "pki/mykey.pem"
41
42
CERT_CHAIN = ""
43
+ SIGN_ALG = None
44
+ DIGEST_ALG = None
45
+ #SIGN_ALG = ds.SIG_RSA_SHA512
46
+ #DIGEST_ALG = ds.DIGEST_SHA512
47
+
42
48
43
49
CONFIG = {
44
50
"entityid" : "%s/idp.xml" % BASE ,
You can’t perform that action at this time.
0 commit comments