Skip to content

Commit e9165c8

Browse files
committed
Remove unnecesary comments
1 parent 257e3ab commit e9165c8

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

src/onelogin/saml2/auth.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
from base64 import b64encode
1515
from urllib import quote_plus
1616

17-
# import dm.xmlsec.binding as xmlsec
18-
1917
from onelogin.saml2.settings import OneLogin_Saml2_Settings
2018
from onelogin.saml2.response import OneLogin_Saml2_Response
2119
from onelogin.saml2.errors import OneLogin_Saml2_Error
@@ -433,8 +431,6 @@ def __build_signature(self, saml_data, relay_state, saml_type, sign_algorithm=On
433431
OneLogin_Saml2_Error.SP_CERTS_NOT_FOUND
434432
)
435433

436-
# xmlsec.initialize() # already done in utils module
437-
438434
dsig_ctx = xmlsec.DSigCtx()
439435
dsig_ctx.signKey = xmlsec.Key.loadMemory(key, xmlsec.KeyDataFormatPem, None)
440436

src/onelogin/saml2/utils.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,6 @@ def generate_name_id(value, sp_nq, sp_format, cert=None, debug=False, nq=None):
630630
xml = name_id_container.toxml()
631631
elem = fromstring(xml)
632632

633-
# xmlsec.initialize('openssl') # done when the module is loaded
634-
635633
if debug:
636634
xmlsec.set_error_callback(print_xmlsec_errors)
637635

@@ -739,8 +737,6 @@ def decrypt_element(encrypted_data, key, debug=False):
739737
elif isinstance(encrypted_data, basestring):
740738
encrypted_data = fromstring(str(encrypted_data))
741739

742-
# xmlsec.initialize() # Initialized at the start of the module
743-
744740
if debug:
745741
xmlsec.set_error_callback(print_xmlsec_errors)
746742

@@ -814,8 +810,6 @@ def add_sign(xml, key, cert, debug=False, sign_algorithm=OneLogin_Saml2_Constant
814810
else:
815811
raise Exception('Error parsing xml string')
816812

817-
# xmlsec.initialize() # Initialized at the start of the module
818-
819813
if debug:
820814
xmlsec.set_error_callback(print_xmlsec_errors)
821815

@@ -920,8 +914,6 @@ def validate_sign(xml, cert=None, fingerprint=None, fingerprintalg='sha1', valid
920914
else:
921915
raise Exception('Error parsing xml string')
922916

923-
# xmlsec.initialize() # Initialized at the start of the module
924-
925917
if debug:
926918
xmlsec.set_error_callback(print_xmlsec_errors)
927919

@@ -985,8 +977,6 @@ def validate_metadata_sign(xml, cert=None, fingerprint=None, fingerprintalg='sha
985977
else:
986978
raise Exception('Error parsing xml string')
987979

988-
# xmlsec.initialize() # Initialized at the start of the module
989-
990980
if debug:
991981
xmlsec.set_error_callback(print_xmlsec_errors)
992982

@@ -1038,8 +1028,6 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
10381028
:type: bool
10391029
"""
10401030
try:
1041-
# xmlsec.initialize() # Initialized at the start of the module
1042-
10431031
if debug:
10441032
xmlsec.set_error_callback(print_xmlsec_errors)
10451033

@@ -1103,8 +1091,6 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
11031091
:type: bool
11041092
"""
11051093
try:
1106-
# xmlsec.initialize() # Initialized at the start of the module
1107-
11081094
if debug:
11091095
xmlsec.set_error_callback(print_xmlsec_errors)
11101096

0 commit comments

Comments
 (0)