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

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