Description: Fix cryptography import
 Backported from:
 https://github.com/jborean93/pyspnego/pull/87/files#diff-79833740d82004c75cf28de2e216fb0b0c11f7a271470f9a9503bb374e85ba4fR36.patch
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1123071
Forwarded: no
Last-Update: 2025-12-30

--- python-pyspnego-0.10.2.orig/requirements-test.txt
+++ python-pyspnego-0.10.2/requirements-test.txt
@@ -10,4 +10,3 @@ pytest-cov
 pytest-mock
 pywin32 ; sys_platform == 'win32'
 ruamel.yaml
-types-cryptography
--- python-pyspnego-0.10.2.orig/src/spnego/_ntlm_raw/crypto.py
+++ python-pyspnego-0.10.2/src/spnego/_ntlm_raw/crypto.py
@@ -20,7 +20,7 @@ import struct
 import typing
 
 from cryptography.hazmat.backends import default_backend
-from cryptography.hazmat.primitives.ciphers import Cipher, algorithms
+from cryptography.hazmat.primitives.ciphers import Cipher
 
 from spnego._ntlm_raw.des import DES
 from spnego._ntlm_raw.md4 import md4
@@ -31,6 +31,14 @@ from spnego._ntlm_raw.messages import (
     TargetInfo,
 )
 
+try:
+    # cryptography 43.0.0 and later moved ARC4 to decrepit
+    from cryptography.hazmat.decrepit.ciphers import algorithms
+except ImportError:
+    from cryptography.hazmat.primitives.ciphers import (  # type: ignore[no-redef]
+        algorithms,
+    )
+
 # A user does not need to specify their actual plaintext password they can specify the LM and NT hash (from lmowfv1 and
 # ntowfv2) in the form 'lm_hash_hex:nt_hash_hex'. This is still considered a plaintext pass as we can use it to build
 # the LM and NT response but it's only usable for NTLM.
