diff --git a/python-ntlm-auth.spec b/python-ntlm-auth.spec index bfd8c44bb50eb2e31bcffd2b56ab67c5a82eb638..c662ee335d227bb48bd75da9dfde336848e0af6d 100644 --- a/python-ntlm-auth.spec +++ b/python-ntlm-auth.spec @@ -4,8 +4,8 @@ %global library_name ntlm_auth Name: python-%{srcname} Version: 1.5.0 -Release: 1 -Summary: Python 3 compatible NTLM library +Release: 2 +Summary: Python 3 compatible NTLM library (requires md4, thus legacy OpenSSL settings) License: MIT URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://github.com/%{gh_owner}/%{pypi_name}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz @@ -13,9 +13,12 @@ BuildArch: noarch BuildRequires: python3-setuptools python3-devel python3-pytest python3-requests BuildRequires: python3dist(cryptography) %description - This package allows Python clients running on any operating system to provide +This package allows Python clients running on any operating system to provide NTLM authentication to a supporting server. +With OpenSSL 3 or above, the legacy OpenSSL provider needs to be set in order +to support md4 in Python. + %package -n python3-%{srcname} Obsoletes: python3-ntlm3 < 1.0.3-1 Provides: python3-ntlm3 = %{version}-%{release} @@ -36,6 +39,26 @@ rm -rf %{pypi_name}.egg-info %py3_install %check +# 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_iis.py tests %files -n python3-%{srcname} @@ -45,6 +68,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{library_name}-%{version}-py%{python3_version}.egg-info %changelog +* Thu Feb 2 2023 liyanan - 1.5.0-2 +- Use the legacy OpenSSL provider in %check to support md4 + * Thu Jun 23 2022 SimpleUpdate Robot - 1.5.0-1 - Upgrade to version 1.5.0