Commit Graph

2 Commits

Author SHA1 Message Date
Haixiao Yan
076217856e
python3-m2crypto: correct struct packing on 32-bit with _TIME_BITS=64
Fixes:
   # python3 -munittest -v test_ssl.MiscSSLClientTestCase.test_server_simple_timeouts
test_server_simple_timeouts (test_ssl.MiscSSLClientTestCase.test_server_simple_timeouts) ... ERROR

======================================================================
ERROR: test_server_simple_timeouts (test_ssl.MiscSSLClientTestCase.test_server_simple_timeouts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python3-m2crypto/tests/test_ssl.py", line 474, in test_server_simple_timeouts
    s.set_socket_read_timeout(SSL.timeout())
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/M2Crypto/SSL/Connection.py", line 680, in set_socket_read_timeout
    self.socket.setsockopt(
    ~~~~~~~~~~~~~~~~~~~~~~^
        socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeo.pack()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
OSError: [Errno 22] Invalid argument

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-11-04 16:52:46 -08:00
Haixiao Yan
97a9a1b93b
python3-m2crypto: upgrade 0.45.1 -> 0.46.2
python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
refreshed for 0.46.2
python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch
removed, this patch doesn't work for 0.45.1 and 0.46.2.

Fix the following test hang:

test_IP_call (tests.test_ssl.HttpslibSSLSNIClientTestCase.test_IP_call)
...

Changelog:
===========
0.46.2 - 2025-10-02
-------------------

- fix[m2xmlrpclib]: make the module compatible with Python 3.6

0.46.1 - 2025-10-02
-------------------

- Correct license to BSD-2-Clause and update references
- Specify in setup.cfg that we require Python >= 3.6

0.46.0 - 2025-10-01
-------------------

(Tested on Pythons between 3.6 and 3.14.0~rc3)

- M2Crypto closes SSL connection on closing HTTPS Connection, and
  some other related issues (#203, #278)
- Modernize C API by eliminating use of deprecated
  PyBytes_AsStringAndSize and related functions with Python
  Buffer Protocol (#375)
- Whole project is completely covered with type hints and is
  checked by mypy (also while doing that, the whole project was
  blackened) (#344)
- Add logging support to C extension code sending messages to the
  Python logging
- Introducing first efforts to support Engine object (#229)
- Reworked and fixed M2Crypto.m2xmlrpclib module (#163)
- Reverted removal of demo/ subdirectory
- Improve SMIME documentation (#377)
- Some other minor bugs, improvements, and removal of dead code

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-10-16 08:48:34 -07:00