Skip to content

Commit c0c412e

Browse files
committed
Difference between sigver.signed_instance_factory and Entity.sign
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
1 parent 68d3989 commit c0c412e

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/saml2/entity.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,12 @@ def unpack_soap_message(text):
467467

468468
# XXX DONE will actually use sign_alg and digest_alg for the POST-Binding
469469
# XXX DONE deepest level - needs to decide the sign_alg and digest_alg value
470-
# XXX calls pre_signature_part
470+
# XXX a controler for signed_instance_factory
471+
# XXX syncs pre_signature_part and signed_instance_factory
472+
# XXX makes sure pre_signature_part is called before signed_instance_factory
473+
# XXX calls pre_signature_part - must have sign_alg & digest_alg
474+
# XXX calls signed_instance_factory - after pre_signature_part
475+
# XXX !!expects a msg object!!
471476
def sign(
472477
self,
473478
msg,

src/saml2/sigver.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ def _instance(klass, ava, seccont, base64encode=False, elements_to_sign=None):
301301
return instance
302302

303303

304+
# XXX will actually sign the nodes
305+
# XXX assumes pre_signature_part has already been called
306+
# XXX calls sign without specifying sign_alg/digest_alg
307+
# XXX this is fine as the algs are embeded in the document
308+
# XXX as setup by pre_signature_part
309+
# XXX !!expects instance string!!
304310
def signed_instance_factory(instance, seccont, elements_to_sign=None):
305311
"""
306312

0 commit comments

Comments
 (0)