#3 Use the legacy OpenSSL provider for 3 tests in %check to support md4
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/python-requests_ntlm legacy  into  rawhide

file modified
+26 -3
@@ -3,7 +3,7 @@ 

  Name:           python-%{srcname}

  Version:        1.1.0

  Release:        17%{?dist}

- Summary:        NTLM module for python requests

+ Summary:        NTLM module for python requests (requires md4, thus legacy OpenSSL settings)

  

  License:        ISC

  URL:            https://pypi.python.org/pypi/requests_ntlm
@@ -12,7 +12,10 @@ 

  

  %global _description %{expand:

  This package allows Python clients running on any operating system to provide

- NTLM authentication to a supporting server.}

+ NTLM authentication to a supporting server.

+ 

+ With OpenSSL 3 or above, this needs to set the legacy OpenSSL provider in

+ order to support md4 in Python.}

  

  %description %{_description}

  
@@ -42,7 +45,27 @@ 

  

  %check

  %python3 -m tests.test_server &

- %python3 -m pytest --ignore=tests/functional/test_functional.py --ignore=tests/test_server.py -vv

+ %python3 -m pytest --ignore=tests/functional/test_functional.py --ignore=tests/test_server.py -vv -k 'not (TestRequestsNtlm and not username)'

+ 

+ # see https://github.com/jborean93/ntlm-auth/issues/22

+ cat > openssl.cnf << EOF

+ openssl_conf = openssl_init

+ 

+ [openssl_init]

+ providers = provider_sect

+ 

+ [provider_sect]

+ default = default_sect

+ legacy = legacy_sect

+ 

+ [default_sect]

+ activate = 1

+ 

+ [legacy_sect]

+ activate = 1

+ EOF

+ export OPENSSL_CONF=${PWD}/openssl.cnf

+ %python3 -m pytest --ignore=tests/functional/test_functional.py --ignore=tests/test_server.py -vv -k '(TestRequestsNtlm and not username)'

  

  %files -n python3-%{srcname}

  %license LICENSE

This is required on Fedora 36+

Pull-Request has been merged by churchyard

2 years ago
Metadata