Blame SOURCES/0006-python-Skip-the-DSA-key-test-unless-SHA-1-is-configu.patch

db363b
From f70eee9ef7faa9ccfb6f815977431ae2e02260bc Mon Sep 17 00:00:00 2001
db363b
From: Jakub Hrozek <jhrozek@redhat.com>
db363b
Date: Wed, 16 Jun 2021 12:23:47 +0200
db363b
Subject: [PATCH 6/7] python: Skip the DSA key test unless SHA-1 is configured
db363b
 (#54037)
db363b
db363b
lasso supports DSA-XXX only with SHA-1. The alternative is to use
db363b
DSA-SHA256.
db363b
---
db363b
 bindings/python/tests/profiles_tests.py | 4 ++++
db363b
 1 file changed, 4 insertions(+)
db363b
db363b
diff --git a/bindings/python/tests/profiles_tests.py b/bindings/python/tests/profiles_tests.py
db363b
index 6ec612077..501fd9199 100755
db363b
--- a/bindings/python/tests/profiles_tests.py
db363b
+++ b/bindings/python/tests/profiles_tests.py
db363b
@@ -276,6 +276,10 @@ class LoginTestCase(unittest.TestCase):
db363b
 
db363b
     def test07(self):
db363b
         '''SAMLv2 SSO with DSA key for the IdP'''
db363b
+        default_sign_meth = lasso.getDefaultSignatureMethod()
db363b
+        if default_sign_meth != lasso.SIGNATURE_METHOD_RSA_SHA1:
db363b
+            self.skipTest("This test requires that lasso is compiled with SHA1 as the default signature method")
db363b
+
db363b
         sp = lasso.Server(
db363b
             os.path.join(dataDir, 'sp5-saml2/metadata.xml'),
db363b
             os.path.join(dataDir, 'sp5-saml2/private-key.pem'))
db363b
-- 
db363b
2.26.3
db363b