Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

28 changes: 0 additions & 28 deletions SPECS/m2crypto/CVE-2019-11358.patch

This file was deleted.

175 changes: 0 additions & 175 deletions SPECS/m2crypto/CVE-2020-25657.patch

This file was deleted.

2 changes: 1 addition & 1 deletion SPECS/m2crypto/m2crypto.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"M2Crypto-0.38.0.tar.gz": "99f2260a30901c949a8dc6d5f82cd5312ffb8abc92e76633baf231bbbcb2decb"
"m2crypto-0.48.0.tar.gz": "178e290f558ddf0379aaefd34c0a8ddb21f21502594e588f928dda85f1ad202b"
}
}
49 changes: 36 additions & 13 deletions SPECS/m2crypto/m2crypto.spec
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
Summary: Crypto and SSL toolkit for Python
Name: m2crypto
Version: 0.38.0
Release: 4%{?dist}
License: MIT
Version: 0.48.0
Release: 1%{?dist}
License: BSD
Vendor: Microsoft Corporation
Distribution: Azure Linux
Group: Development/Languages/Python
URL: https://pypi.python.org/pypi/M2Crypto
Source0: https://files.pythonhosted.org/packages/2c/52/c35ec79dd97a8ecf6b2bbd651df528abb47705def774a4a15b99977274e8/M2Crypto-%{version}.tar.gz
Patch0: 0001-skip-test_tls1_nok-which-cant-be-run-in-FIPS.patch
Patch1: CVE-2020-25657.patch
Patch2: CVE-2019-11358.patch
Source0: https://files.pythonhosted.org/packages/89/7a/06ed5c66d63506bc77a7823d56e5e6b4ad3143f3fca2337c46d8b2c191f5/m2crypto-%{version}.tar.gz

%description
M2Crypto is a crypto and SSL toolkit for Python
Expand All @@ -19,13 +16,16 @@ M2Crypto is a crypto and SSL toolkit for Python
Summary: Crypto and SSL toolkit for Python
BuildRequires: openssl-devel
BuildRequires: python3-devel
BuildRequires: python3-packaging
BuildRequires: python3-setuptools
BuildRequires: python3-xml
BuildRequires: swig
Requires: openssl >= 1.1.1g-6
Requires: python3
Requires: python3-packaging
%if 0%{?with_check}
BuildRequires: python3-pip
BuildRequires: openssl
BuildRequires: python3-pytest
%endif

%description -n python3-m2crypto
Expand All @@ -39,7 +39,7 @@ server. S/MIME. ZServerSSL: A HTTPS server for Zope. ZSmime: An S/MIME
messenger for Zope.

%prep
%autosetup -n M2Crypto-%{version} -p1
%autosetup -n m2crypto-%{version}

%build
%py3_build
Expand All @@ -48,16 +48,39 @@ messenger for Zope.
%py3_install

%check
pip3 install parameterized
#Testing: MiscSSLClientTestCase failing with SSLError not raised
%python3 setup.py test
# setuptools >= 72 removed the 'setup.py test' command, so run the suite
# directly with pytest. Tests import M2Crypto from the installed buildroot.
# Azure Linux's OpenSSL 3.x keeps MD5 in the "legacy" provider, which is not
# loaded by default; enable it for the test run so the HMAC-MD5 assertion in
# tests/test_evp.py (EVPTestCase.test_hmac) runs and passes unmodified.
cat > %{_builddir}/openssl-legacy.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
OPENSSL_CONF=%{_builddir}/openssl-legacy.cnf \
PYTHONPATH=%{buildroot}%{python3_sitelib} %python3 -m pytest -v tests/

%files -n python3-m2crypto
%defattr(-,root,root)
%license LICENCE
%license LICENSES/BSD-2-Clause.txt
%{python3_sitelib}/*

%changelog
* Tue Jun 30 2026 Sumit Jena <v-sumitjena@microsoft.com> - 0.48.0-1
- Upgrade to version 0.48.0
- Drop CVE-2020-25657.patch (fixed upstream) and CVE-2019-11358.patch (bundled jQuery doc no longer shipped)
- Drop FIPS TLS1 test-skip patch (upstream tests now handle OpenSSL 3.x)
- Run %%check offline via pytest instead of removed 'setup.py test'; enable the OpenSSL legacy provider during %%check so the HMAC-MD5 test runs unmodified; drop network 'pip3 install parameterized'
- License verified as BSD-2-Clause

* Wed Jan 29 2025 Jyoti Kanase <v-jykanase@microsoft.com> - 0.38.0-4
- Fix CVE-2019-11358

Expand Down
4 changes: 2 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12921,8 +12921,8 @@
"type": "other",
"other": {
"name": "m2crypto",
"version": "0.38.0",
"downloadUrl": "https://files.pythonhosted.org/packages/2c/52/c35ec79dd97a8ecf6b2bbd651df528abb47705def774a4a15b99977274e8/M2Crypto-0.38.0.tar.gz"
"version": "0.48.0",
"downloadUrl": "https://files.pythonhosted.org/packages/89/7a/06ed5c66d63506bc77a7823d56e5e6b4ad3143f3fca2337c46d8b2c191f5/m2crypto-0.48.0.tar.gz"
}
}
},
Expand Down
Loading