Skip to content

Commit 7582e4f

Browse files
committed
Merge branch 'master' of https://github.com/onelogin/python-saml
2 parents 12f3d39 + 71b76f2 commit 7582e4f

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ SAML requires a x.509 cert to sign and encrypt elements like NameID, Message, As
135135
If our environment requires sign or encrypt support, the certs folder may contain the x509 cert and the private key that the SP will use:
136136

137137
* sp.crt The public cert of the SP
138-
* sp.key The privake key of the SP
138+
* sp.key The private key of the SP
139139

140140
Or also we can provide those data in the setting file at the 'x509cert' and the privateKey' json parameters of the 'sp' element.
141141

@@ -225,7 +225,7 @@ This is the settings.json file:
225225
},
226226
// If you need to specify requested attributes, set a
227227
// attributeConsumingService. nameFormat, attributeValue and
228-
// friendlyName can be ommited
228+
// friendlyName can be omitted
229229
"attributeConsumingService": {
230230
"ServiceName": "SP test",
231231
"serviceDescription": "Test Service",
@@ -356,7 +356,7 @@ In addition to the required settings data (idp, sp), there is extra information
356356

357357
// Authentication context.
358358
// Set to false and no AuthContext will be sent in the AuthNRequest,
359-
// Set true or don't present thi parameter and you will get an AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'
359+
// Set true or don't present this parameter and you will get an AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'
360360
// Set an array with the possible auth context values: array ('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509'),
361361
'requestedAuthnContext': true,
362362
// Allows the authn comparison parameter to be set, defaults to 'exact' if the setting is not present.
@@ -378,7 +378,7 @@ In addition to the required settings data (idp, sp), there is extra information
378378
'signatureAlgorithm' => 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
379379
},
380380

381-
// Contact information template, it is recommended to suply a
381+
// Contact information template, it is recommended to supply
382382
// technical and support contacts.
383383
"contactPerson": {
384384
"technical": {
@@ -392,7 +392,7 @@ In addition to the required settings data (idp, sp), there is extra information
392392
},
393393

394394
// Organization information template, the info in en_US lang is
395-
// recomended, add more if required.
395+
// recommended, add more if required.
396396
"organization": {
397397
"en-US": {
398398
"name": "sp_test",

tests/src/OneLogin/saml2_tests/utils_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,18 +731,18 @@ def testDecryptElement(self):
731731
try:
732732
OneLogin_Saml2_Utils.decrypt_element(encrypted_data, key2)
733733
self.assertTrue(False)
734-
except:
735-
pass
734+
except Exception as e:
735+
self.assertEqual('failed to decrypt', e[0])
736736

737-
key_3_file_name = join(self.data_path, 'misc', 'sp2.key')
737+
key_3_file_name = join(self.data_path, 'misc', 'sp3.key')
738738
f = open(key_3_file_name, 'r')
739739
key3 = f.read()
740740
f.close()
741741
try:
742742
OneLogin_Saml2_Utils.decrypt_element(encrypted_data, key3)
743743
self.assertTrue(False)
744-
except:
745-
pass
744+
except Exception as e:
745+
self.assertEqual('failed to decrypt', e[0])
746746

747747
xml_nameid_enc_2 = b64decode(self.file_contents(join(self.data_path, 'responses', 'invalids', 'encrypted_nameID_without_EncMethod.xml.base64')))
748748
dom_nameid_enc_2 = parseString(xml_nameid_enc_2)

0 commit comments

Comments
 (0)