Skip to content

Commit 3c3f1c1

Browse files
committed
added support for md5 as digest algorithm (used to test that this is rejected);
added support for redirect signature algorithm check
1 parent 5886581 commit 3c3f1c1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/saml2/samlp.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,18 @@ def authn_request_from_string(xml_string):
13171317
return saml2.create_class_from_xml_string(AuthnRequest, xml_string)
13181318

13191319

1320+
class HttpParameters():
1321+
"""GET or POST parameters for Redirecto or POST-SimpleSign bindings"""
1322+
signature = None
1323+
sigalg = None
1324+
# Relaystate and SAML message are stored elsewhere
1325+
def __init__(self, dict):
1326+
try:
1327+
self.signature = dict["Signature"][0]
1328+
self.sigalg = dict["SigAlg"][0]
1329+
except KeyError:
1330+
pass
1331+
13201332
class StatusType_(SamlBase):
13211333
"""The urn:oasis:names:tc:SAML:2.0:protocol:StatusType element """
13221334

src/xmldsig/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
ENCODING_BASE64 = 'http://www.w3.org/2000/09/xmldsig#base64'
1313

1414
# digest and signature algorithms (not implemented = commented out)
15+
DIGEST_MD5 = 'http://www.w3.org/2001/04/xmldsig-more#md5' # test framework only!
1516
DIGEST_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'
1617
DIGEST_SHA224 = 'http://www.w3.org/2001/04/xmldsig-more#sha224'
1718
DIGEST_SHA256 = 'http://www.w3.org/2001/04/xmlenc#sha256'

0 commit comments

Comments
 (0)