python: Skip the DSA key test unless SHA-1 is configured (#54037)

lasso supports DSA-XXX only with SHA-1. The alternative is to use
DSA-SHA256.
This commit is contained in:
Jakub Hrozek 2021-06-16 12:23:47 +02:00 committed by Benjamin Dauvergne
parent f9a3aca0cb
commit f70eee9ef7
1 changed files with 4 additions and 0 deletions

View File

@ -276,6 +276,10 @@ class LoginTestCase(unittest.TestCase):
def test07(self):
'''SAMLv2 SSO with DSA key for the IdP'''
default_sign_meth = lasso.getDefaultSignatureMethod()
if default_sign_meth != lasso.SIGNATURE_METHOD_RSA_SHA1:
self.skipTest("This test requires that lasso is compiled with SHA1 as the default signature method")
sp = lasso.Server(
os.path.join(dataDir, 'sp5-saml2/metadata.xml'),
os.path.join(dataDir, 'sp5-saml2/private-key.pem'))