4141
4242def print_xmlsec_errors (filename , line , func , error_object , error_subject , reason , msg ):
4343 """
44- Auxiliary method. It override the default xmlsec debug message.
44+ Auxiliary method. It overrides the default xmlsec debug message.
4545 """
4646
4747 info = []
@@ -80,7 +80,7 @@ def decode_base64_and_inflate(value):
8080 @staticmethod
8181 def deflate_and_base64_encode (value ):
8282 """
83- Deflates and the base64 encodes a string
83+ Deflates and then base64 encodes a string
8484 :param value: The string to deflate and encode
8585 :type value: string
8686 :returns: The deflated and encoded string
@@ -137,13 +137,13 @@ def format_cert(cert, heads=True):
137137 """
138138 Returns a x509 cert (adding header & footer if required).
139139
140- :param cert: A x509 unformated cert
140+ :param cert: A x509 unformatted cert
141141 :type: string
142142
143143 :param heads: True if we want to include head and footer
144144 :type: boolean
145145
146- :returns: Formated cert
146+ :returns: Formatted cert
147147 :rtype: string
148148 """
149149 x509_cert = cert .replace ('\x0D ' , '' )
@@ -170,7 +170,7 @@ def format_private_key(key, heads=True):
170170 :param heads: True if we want to include head and footer
171171 :type: boolean
172172
173- :returns: Formated private key
173+ :returns: Formatted private key
174174 :rtype: string
175175 """
176176 private_key = key .replace ('\x0D ' , '' )
@@ -576,12 +576,12 @@ def calculate_x509_fingerprint(x509_cert, alg='sha1'):
576576 @staticmethod
577577 def format_finger_print (fingerprint ):
578578 """
579- Formates a fingerprint.
579+ Formats a fingerprint.
580580
581581 :param fingerprint: fingerprint
582582 :type: string
583583
584- :returns: Formated fingerprint
584+ :returns: Formatted fingerprint
585585 :rtype: string
586586 """
587587 formated_fingerprint = fingerprint .replace (':' , '' )
@@ -1012,7 +1012,7 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
10121012 :param xml: The element we should validate
10131013 :type: Document
10141014
1015- :param cert: The pubic cert
1015+ :param cert: The public cert
10161016 :type: string
10171017
10181018 :param fingerprint: The fingerprint of the public cert
@@ -1072,7 +1072,7 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
10721072 @staticmethod
10731073 def validate_binary_sign (signed_query , signature , cert = None , algorithm = OneLogin_Saml2_Constants .RSA_SHA1 , debug = False ):
10741074 """
1075- Validates signed bynary data (Used to validate GET Signature).
1075+ Validates signed binary data (Used to validate GET Signature).
10761076
10771077 :param signed_query: The element we should validate
10781078 :type: string
@@ -1081,7 +1081,7 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
10811081 :param signature: The signature that will be validate
10821082 :type: string
10831083
1084- :param cert: The pubic cert
1084+ :param cert: The public cert
10851085 :type: string
10861086
10871087 :param algorithm: Signature algorithm
@@ -1117,8 +1117,8 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
11171117
11181118 @staticmethod
11191119 def get_encoded_parameter (get_data , name , default = None , lowercase_urlencoding = False ):
1120- """Return an url encoded get parameter value
1121- Prefer to extract the original encoded value directly from query_string since url
1120+ """Return a URL encoded get parameter value
1121+ Prefer to extract the original encoded value directly from query_string since URL
11221122 encoding is not canonical. The encoding used by ADFS 3.0 is not compatible with
11231123 python's quote_plus (ADFS produces lower case hex numbers and quote_plus produces
11241124 upper case hex numbers)
0 commit comments