summaryrefslogtreecommitdiff
path: root/dev-python/m2crypto
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/m2crypto')
-rw-r--r--dev-python/m2crypto/Manifest6
-rw-r--r--dev-python/m2crypto/files/m2crypto-0.37.1-openssl-fixes.patch76
-rw-r--r--dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch119
-rw-r--r--dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild69
-rw-r--r--dev-python/m2crypto/m2crypto-0.38.0.ebuild2
5 files changed, 2 insertions, 270 deletions
diff --git a/dev-python/m2crypto/Manifest b/dev-python/m2crypto/Manifest
index 92b66d179d9d..b933b1488158 100644
--- a/dev-python/m2crypto/Manifest
+++ b/dev-python/m2crypto/Manifest
@@ -1,7 +1,3 @@
-AUX m2crypto-0.37.1-openssl-fixes.patch 3074 BLAKE2B 3daa583d4f7e04840a9c2f15fc583dcf8e4ee996aee93d9c180ccc4920f36cd2f90e2f2591732597b0108f3944cb3b22d0eb202c8dfd500fccb8e805aa74666d SHA512 fd73a98592026b39341200fc378042b71272dad4c43c63e4da3aafabae4f5a8aadeb41738ca99cca87ebeecb5455abadfe96d0c6640702b14f138f8122dc57ee
-AUX m2crypto-0.37.1-py310.patch 3843 BLAKE2B e983077f9eda65ea63e34f73178429aea8da61021c38ed68a4798857f3b6b37cea9cbd3b8886d4b169521cda243b87bda18de651f60dd53560693c8472374f7d SHA512 0fbc6eecd28e52036df5a74d825c7dba9fe7d3573c88a564607d4514f01631441929d0d02d6bbf6269b0f077c5ee4b0090b91cdb5b38808480623a782f274d51
-DIST M2Crypto-0.37.1.tar.gz 1247031 BLAKE2B 3628150b8da15d7356298b6e52e0d8fa7875921a184a0eba3a97eff0588c9e0fee340c92fd486919057d900d6e3b2b711174dde9761fe247848f92ac6434df0a SHA512 9a5e0220704b4897a9ca7efa4b3b57447b9175c52e8039a85bff7bb1a43b709c69f3c8b5903df461f8de39d3f8a20f9bf494df6f5882771846adfe2c03fbea9e
DIST M2Crypto-0.38.0.tar.gz 1241269 BLAKE2B 95433090e08ff72cd2b0779491dc38b89eca159b26812e763b5b8973e3d27249a96d5a2c983b59f414184f64beb8e455dc26979310378db89dd2081741d4d17d SHA512 b1e24e3101ce0dd9f17be4cabeddc2ec0f1228b270d74ef2fb38bae8807c5025b031d0743185f06370786a3dd5c3f42129720534dcff07ea4de3c727613f8d20
-EBUILD m2crypto-0.37.1-r1.ebuild 1487 BLAKE2B 13825020a0ab5d5203e238bd5d5cadf719d77c02dfa1b4be8fca51a79b1238360bfc52ae06500ff92c0caec2418c51db8c4c7016d77977304c80a5d6db2531b3 SHA512 2100ed3ca111b84ee5dfbe92f83218a1403981d63f906b49a7d80faddf46f8bbbbaca42da5ec03b304b91dec30dfb296622c9340499ad29c2a55e53b08e96ab6
-EBUILD m2crypto-0.38.0.ebuild 1494 BLAKE2B 8d91c7f87e680de0450db4312dbb59984849f5caafea807f77a2797c3265fd08fe37d0913a0b111c41710a162bfa09c77196c9c015d13f66b56aacddbcbd34e4 SHA512 4d64ad186eb92ccf51e96ddff6c6cbe8c79d9a3ea142b6fea782940702ec572ae0a64875b0753308fbffc1e80ba4ef5e2d873165d362039c0429d6c4a0b6262b
+EBUILD m2crypto-0.38.0.ebuild 1493 BLAKE2B fa8dc1b85a20b0bce14c6bad262a7ffbb799b8130342f8ce4da8fb97303b22a7df0de5eb1a3e3f5524d4e20770b150f9652b3f363c939c61d938cb74ee2daf83 SHA512 a985776c3c522c50d076881099079429e4c9d99d010b1edaadba1d8ae9cb4afefe827dcd961593bcca1141ec298615745628d8003c0e84043a353e3e3c5af832
MISC metadata.xml 380 BLAKE2B 99a1c8e8202bed7c6d0ff8cdff3f17b664791405b082be2b7d72b3fe2b77bf89c886666d9bdce6a96c540b9518042b9d49b9af926ca10ab4c5b3b416182de01c SHA512 f2e3b4228c45471f0132b3bb412f017f4006eb82bd63e187db3efdfd3f412c1db19bdb79d37630bb059f75ef69f110687b8924d22c2aef0101cb40eb3486f1e6
diff --git a/dev-python/m2crypto/files/m2crypto-0.37.1-openssl-fixes.patch b/dev-python/m2crypto/files/m2crypto-0.37.1-openssl-fixes.patch
deleted file mode 100644
index c249f7adbb80..000000000000
--- a/dev-python/m2crypto/files/m2crypto-0.37.1-openssl-fixes.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 73fbd1e646f6bbf202d4418bae80eb9941fbf552 Mon Sep 17 00:00:00 2001
-From: Casey Deccio <casey@deccio.net>
-Date: Fri, 8 Jan 2021 12:43:09 -0700
-Subject: [PATCH] Allow verify_cb_* to be called with ok=True
-
-With https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-OpenSSL allowed verificaton to continue on UNABLE_TO_VERIFY_LEAF_SIGNATURE
----
- tests/test_ssl.py | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_ssl.py b/tests/test_ssl.py
-index 92b6942..7a3271a 100644
---- a/tests/test_ssl.py
-+++ b/tests/test_ssl.py
-@@ -59,8 +59,13 @@ def allocate_srv_port():
-
-
- def verify_cb_new_function(ok, store):
-- assert not ok
- err = store.get_error()
-+ # If err is X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, then instead of
-+ # aborting, this callback is called to retrieve additional error
-+ # information. In this case, ok might not be False.
-+ # See https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-+ if err != m2.X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
-+ assert not ok
- assert err in [m2.X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
- m2.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
- m2.X509_V_ERR_CERT_UNTRUSTED,
-@@ -618,7 +623,12 @@ class MiscSSLClientTestCase(BaseSSLClientTestCase):
-
- def verify_cb_old(self, ctx_ptr, x509_ptr, err, depth, ok):
- try:
-- self.assertFalse(ok)
-+ # If err is X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, then instead of
-+ # aborting, this callback is called to retrieve additional error
-+ # information. In this case, ok might not be False.
-+ # See https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-+ if err != m2.X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
-+ self.assertFalse(ok)
- self.assertIn(err,
- [m2.X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
- m2.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
---
-2.31.1
-
-From d06eaa88a5f491827733f32027c46de3557fbd05 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
-Date: Fri, 19 Feb 2021 15:53:02 +0100
-Subject: [PATCH] Use of RSA_SSLV23_PADDING has been deprecated.
-
-Fixes #293.
----
- tests/test_rsa.py | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/tests/test_rsa.py b/tests/test_rsa.py
-index 3de5016..7299785 100644
---- a/tests/test_rsa.py
-+++ b/tests/test_rsa.py
-@@ -124,11 +124,6 @@ class RSATestCase(unittest.TestCase):
- ptxt = priv.private_decrypt(ctxt, p)
- self.assertEqual(ptxt, self.data)
-
-- # sslv23_padding
-- ctxt = priv.public_encrypt(self.data, RSA.sslv23_padding)
-- res = priv.private_decrypt(ctxt, RSA.sslv23_padding)
-- self.assertEqual(res, self.data)
--
- # no_padding
- with six.assertRaisesRegex(self, RSA.RSAError, 'data too small'):
- priv.public_encrypt(self.data, RSA.no_padding)
---
-2.31.1
-
diff --git a/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch b/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch
deleted file mode 100644
index f9be349fc3db..000000000000
--- a/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/SWIG/_bio.i b/SWIG/_bio.i
-index 84b76b3..6c090a4 100644
---- a/SWIG/_bio.i
-+++ b/SWIG/_bio.i
-@@ -246,8 +246,8 @@ PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int
- const void *kbuf, *ibuf;
- Py_ssize_t klen, ilen;
-
-- if ((PyObject_AsReadBuffer(key, &kbuf, &klen) == -1)
-- || (PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1))
-+ if ((m2_PyObject_AsReadBuffer(key, &kbuf, &klen) == -1)
-+ || (m2_PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1))
- return NULL;
-
- BIO_set_cipher(b, (const EVP_CIPHER *)c,
-diff --git a/SWIG/_ec.i b/SWIG/_ec.i
-index f47d593..a492f6f 100644
---- a/SWIG/_ec.i
-+++ b/SWIG/_ec.i
-@@ -466,7 +466,7 @@ EC_KEY* ec_key_from_pubkey_der(PyObject *pubkey) {
- const unsigned char *tempBuf;
- EC_KEY *keypair;
-
-- if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
-+ if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
- {
- return NULL;
- }
-@@ -486,7 +486,7 @@ EC_KEY* ec_key_from_pubkey_params(int nid, PyObject *pubkey) {
- const unsigned char *tempBuf;
- EC_KEY *keypair;
-
-- if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
-+ if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
- {
- return NULL;
- }
-diff --git a/SWIG/_lib.i b/SWIG/_lib.i
-index 954e99b..351134b 100644
---- a/SWIG/_lib.i
-+++ b/SWIG/_lib.i
-@@ -137,8 +137,8 @@ m2_PyObject_AsReadBuffer(PyObject * obj, const void **buffer,
- len = view.len;
- }
- } else {
-- if ((ret = PyObject_AsReadBuffer(obj, buffer, &len)) != 0)
-- return ret;
-+ PyErr_SetString(PyExc_TypeError, "expected a readable buffer object");
-+ return -1;
- }
- if (len > INT_MAX) {
- m2_PyBuffer_Release(obj, &view);
-@@ -171,11 +171,8 @@ static int m2_PyObject_GetBufferInt(PyObject *obj, Py_buffer *view, int flags)
- if (PyObject_CheckBuffer(obj))
- ret = PyObject_GetBuffer(obj, view, flags);
- else {
-- const void *buf;
--
-- ret = PyObject_AsReadBuffer(obj, &buf, &view->len);
-- if (ret == 0)
-- view->buf = (void *)buf;
-+ PyErr_SetString(PyExc_TypeError, "expected a readable buffer object");
-+ return -1;
- }
- if (ret)
- return ret;
-@@ -633,7 +630,7 @@ BIGNUM *hex_to_bn(PyObject *value) {
- }
- }
- else {
-- if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
-+ if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
- return NULL;
- }
-
-@@ -665,7 +662,7 @@ BIGNUM *dec_to_bn(PyObject *value) {
- }
- }
- else {
-- if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
-+ if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
- return NULL;
- }
-
-diff --git a/SWIG/_rc4.i b/SWIG/_rc4.i
-index eb4747e..6af2dc6 100644
---- a/SWIG/_rc4.i
-+++ b/SWIG/_rc4.i
-@@ -46,7 +46,7 @@ PyObject *rc4_update(RC4_KEY *key, PyObject *in) {
- Py_ssize_t len;
- void *out;
-
-- if (PyObject_AsReadBuffer(in, &buf, &len) == -1)
-+ if (m2_PyObject_AsReadBuffer(in, &buf, &len) == -1)
- return NULL;
-
- if (!(out = PyMem_Malloc(len))) {
-diff --git a/SWIG/_util.i b/SWIG/_util.i
-index bc2ee61..18e446a 100644
---- a/SWIG/_util.i
-+++ b/SWIG/_util.i
-@@ -22,7 +22,7 @@ PyObject *util_hex_to_string(PyObject *blob) {
- char *ret;
- Py_ssize_t len;
-
-- if (PyObject_AsReadBuffer(blob, &buf, &len) == -1)
-+ if (m2_PyObject_AsReadBuffer(blob, &buf, &len) == -1)
- return NULL;
-
- ret = hex_to_string((unsigned char *)buf, len);
-@@ -44,7 +44,7 @@ PyObject *util_string_to_hex(PyObject *blob) {
- Py_ssize_t len0;
- long len;
-
-- if (PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
-+ if (m2_PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
- return NULL;
-
- len = len0;
diff --git a/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild b/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild
deleted file mode 100644
index 86a235286642..000000000000
--- a/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2018-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 toolchain-funcs
-
-MY_PN="M2Crypto"
-DESCRIPTION="A Python crypto and SSL toolkit"
-HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- >=dev-lang/swig-2.0.9
- test? ( dev-python/parameterized[${PYTHON_USEDEP}] )
-"
-RDEPEND="
- dev-libs/openssl:0=
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}/${P}-openssl-fixes.patch"
- "${FILESDIR}/${P}-py310.patch"
-)
-
-swig_define() {
- local x
- for x; do
- if tc-cpp-is-true "defined(${x})"; then
- SWIG_FEATURES+=" -D${x}"
- fi
- done
-}
-
-src_prepare() {
- # TODO
- sed -e 's:test_server_simple_timeouts:_&:' \
- -i tests/test_ssl.py || die
- distutils-r1_src_prepare
-}
-
-python_compile() {
- # setup.py looks at platform.machine() to determine swig options.
- # For exotic ABIs, we need to give swig a hint.
- local -x SWIG_FEATURES=
-
- # https://bugs.gentoo.org/617946
- swig_define __ILP32__
-
- # https://bugs.gentoo.org/674112
- swig_define __ARM_PCS_VFP
-
- distutils-r1_python_compile --openssl="${ESYSROOT}"/usr
-}
-
-python_test() {
- esetup.py test
-}
diff --git a/dev-python/m2crypto/m2crypto-0.38.0.ebuild b/dev-python/m2crypto/m2crypto-0.38.0.ebuild
index 5cdac9b517cd..b6170a252e6b 100644
--- a/dev-python/m2crypto/m2crypto-0.38.0.ebuild
+++ b/dev-python/m2crypto/m2crypto-0.38.0.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="test"
RESTRICT="!test? ( test )"