Files
meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.51.0.bb
T
Khem Raj b83277aa7d python3-m2crypto: upgrade 0.49.0 -> 0.51.0
Refresh the setup.py patch.

Changes:
- Security (0.51.0): SSL.Checker no longer splits subjectAltName on
  commas; a URI/email/otherName SAN containing ",DNS:<host>" was
  accepted as a DNS identity (CVE-2026-109087, as listed upstream).
  Hostname checks now use X509_check_host()/X509_check_ip_asc().
- Fix regex injection in TLS hostname verification (no CVE) and
  out-of-bounds reads in BIGNUM conversions.
- BREAKING (0.50.0): TLS 1.0 and 1.1 disabled by default; RC4 emits a
  DeprecationWarning; legacy ENGINE bindings disabled with OpenSSL 3;
  OpenSSL providers isolated in private contexts.
- Add AES-GCM (AEAD) and AuthorityKeyIdentifier support; OpenSSL 4.0
  and SWIG 4.5 compatibility; many memory-leak/ownership fixes.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-11-17 12:58:58 -08:00

59 lines
2.1 KiB
BlitzBasic

SUMMARY = "A Python crypto and SSL toolkit"
HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSES/BSD-2-Clause.txt;md5=8099b0e569f862ece05740aef06c82a2"
SRC_URI[sha256sum] = "5428f6601086a8f5e41aa70248b3b983443e7badf263551c5104ba2ec0c9d955"
SRC_URI += "file://0001-setup.py-Make-the-cmd-available.patch"
SRC_URI += "file://0002-_m2crypto.i-add-py2-py3-C-API-compat-macros.patch"
CVE_STATUS[CVE-2009-0127] = "disputed: upstream claims there is no bug"
CVE_STATUS[CVE-2020-25657] = "fixed-version: the used version (0.46.2) contains the fix already"
inherit pypi siteinfo python_setuptools_build_meta
DEPENDS += "python3-wheel-native"
DEPENDS += "openssl swig-native"
RDEPENDS:${PN} += "\
python3-datetime \
python3-setuptools \
python3-logging \
python3-netclient \
python3-netserver \
python3-numbers \
python3-xmlrpc \
"
DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']} -DOPENSSL_NO_FILENAMES"
SWIG_FEATURES:append:riscv64 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}"
SWIG_FEATURES:append:riscv32 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}"
SWIG_FEATURES:append:mipsarch = " -D_MIPS_SZPTR=${SITEINFO_BITS}"
SWIG_FEATURES:append:powerpc64le = " -D__powerpc64__"
SWIG_FEATURES:append:x86 = " -D__i386__"
SWIG_FEATURES:append:x86-x32 = " -D__ILP32__"
export SWIG_FEATURES
export STAGING_DIR
do_configure:prepend:class-target() {
# workaround for https://github.com/swiftlang/swift/issues/69311
sed -i "/sys\/types.h/d" ${RECIPE_SYSROOT}${includedir}/openssl/e_os2.h
}
do_install:append() {
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/SSL/__pycache__/*.cpython-*.pyc
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/__pycache__/*.cpython-*.pyc
}
CVE_PRODUCT = "heikkitoivonen:m2crypto m2crypto_project:m2crypto"
BBCLASSEXTEND = "native"