From 116de01889e69e41ce14704efbf6e31d37e0715d Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Tue, 31 Aug 2004 21:08:37 +0000 Subject: Added a new Python logout test: Make the same Logout.newFromDump enough times => segfault. --- python/tests/profiles_tests.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'python') diff --git a/python/tests/profiles_tests.py b/python/tests/profiles_tests.py index a7a665ff..18f3450e 100755 --- a/python/tests/profiles_tests.py +++ b/python/tests/profiles_tests.py @@ -176,6 +176,27 @@ class LogoutTestCase(unittest.TestCase): else: self.fail('Logout processResponseMsg should have failed.') + def test05(self): + """IDP logout; testing logout dump & newFromDump().""" + + lassoServer = lasso.Server( + os.path.join(dataDir, 'idp1-la/metadata.xml'), + None, # os.path.join(dataDir, 'idp1-la/public-key.pem') is no more used + os.path.join(dataDir, 'idp1-la/private-key-raw.pem'), + os.path.join(dataDir, 'idp1-la/certificate.pem'), + lasso.signatureMethodRsaSha1) + lassoServer.addProvider( + os.path.join(dataDir, 'sp1-la/metadata.xml'), + os.path.join(dataDir, 'sp1-la/public-key.pem'), + os.path.join(dataDir, 'sp1-la/certificate.pem')) + lassoLogoutDump = """ +https://idp1/metadata_68D63AFCDE6A9CB4DBDBA5C411ED086F_68D63AFCDE6A9CB4DBDBA5C411ED086Fhttps://sp1/metadatahttps://sp1:2006/singleLogout?NameIdentifier=_68D63AFCDE6A9CB4DBDBA5C411ED086F&Format=urn%3Aliberty%3Aiff%3Anameid%3Afederated&NameQualifier=https%3A%2F%2Fidp1%2Fmetadata&ProviderID=https%3A%2F%2Fidp1%2Fmetadata&IssueInstant=2004-08-31T22%3A49%3A35Z&MinorVersion=2&MajorVersion=1&RequestID=_6857939027AA10E2E8DDE40559BAD155&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=law0RBgfmWoJ61u1aCzMhD59cFFh5O%2FY62P7C%2F2UKmOL4Ay7Gln5kI4jtgsbJkBe%0AKM5reehsofqGufpArbOFxEVlsV8To8S1zfXla1yDVB2aLZUb8qnrfrcW3rQoJbMd%0AJSUZ8i5JnADBn1ql31Eh%2BtcXrKDJVAFVZa0%2BHQMpDT1y0n2tsC49gsesLr9bXDHy%0A7Nia7%2Bl9qJfOzMGoiXlP6ClfT8LzjYxtdM7yfSDz%2FY4LcGGcjlGvsmG7tgUeYHPG%0AI6zixoTr2i6AS7PSZ41FosmVZTugBIueWWWtxffXp6BNQbzJqUojyZeGMhNeVtS8%0AaKQZ8KsYgOSAeMAA2v%2FbHw%3D%3D002 +""".strip() # Emacs Python Mode trick: " + for i in range(20): + # The newFromDump should not segfault from time to time. + logout = lasso.Logout.newFromDump(lassoServer, lassoLogoutDump) + self.failUnlessEqual(logout.dump(), lassoLogoutDump) + class DefederationTestCase(unittest.TestCase): def test01(self): -- cgit