python:tests: SHA1 is no longer supported by cryptography module
authorAndreas Schneider <asn@samba.org>
Thu, 9 Nov 2023 21:27:03 +0000 (22:27 +0100)
committerJule Anger <janger@samba.org>
Tue, 21 Nov 2023 11:15:30 +0000 (11:15 +0000)
See https://github.com/pyca/cryptography/issues/8213#issuecomment-1419060001

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 938afb8b28973b0065cc3509b70ebe3f6986de47)

Autobuild-User(v4-19-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-19-test): Tue Nov 21 11:15:30 UTC 2023 on atb-devel-224

python/samba/tests/krb5/pkinit_tests.py

index 15166499adc5b954b6dac089d339a83a3a79c8f5..3d47c799f8680da7141855920804b3f96c19e535 100755 (executable)
@@ -79,28 +79,6 @@ class PkInitTests(KDCBaseTest):
             account_type=account_type,
             opts={'upn': f'{{account}}.{realm}@{realm}'})
 
-    def test_pkinit(self):
-        """Test public-key PK-INIT."""
-        client_creds = self._get_creds()
-        target_creds = self.get_service_creds()
-
-        self._pkinit_req(client_creds, target_creds)
-
-    def test_pkinit_dh(self):
-        """Test Diffie-Hellman PK-INIT."""
-        client_creds = self._get_creds()
-        target_creds = self.get_service_creds()
-
-        self._pkinit_req(client_creds, target_creds,
-                         using_pkinit=PkInit.DIFFIE_HELLMAN)
-
-    def test_pkinit_win2k(self):
-        """Test public-key Windows 2000 PK-INIT."""
-        client_creds = self._get_creds()
-        target_creds = self.get_service_creds()
-
-        self._pkinit_req(client_creds, target_creds, win2k_variant=True)
-
     def test_pkinit_no_des3(self):
         """Test public-key PK-INIT without specifying the DES3 encryption
         type. It should fail."""
@@ -740,7 +718,7 @@ class PkInitTests(KDCBaseTest):
                            ca_private_key,
                            certificate_signature=None):
         if certificate_signature is None:
-            certificate_signature = hashes.SHA1
+            certificate_signature = hashes.SHA256
 
         user_name = creds.get_username()