Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.0 - TLSSocket.__init__() raises OverflowError on macOS 14.7 on ARM 64 #87

Open
odkr opened this issue Dec 17, 2024 · 0 comments
Open

Comments

@odkr
Copy link

odkr commented Dec 17, 2024

First of all, thanks a lot for oscrypto! Unfortunately, it does not seem to work under macOS 14.7 on Apple Silicon.

System

$ uname -mor
Darwin 23.6.0 arm64
$ python3 --version
Python 3.9.6

MWE

$ python3 -mvenv foo
$ . foo/bin/activate
$ pip install -U pip
Requirement already satisfied: pip in ./foo/lib/python3.9/site-packages (21.2.4)
Collecting pip
  Using cached pip-24.3.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-24.3.1
$ pip install oscrypto
Collecting oscrypto
  Using cached oscrypto-1.3.0-py2.py3-none-any.whl.metadata (15 kB)
Collecting asn1crypto>=1.5.1 (from oscrypto)
  Using cached asn1crypto-1.5.1-py2.py3-none-any.whl.metadata (13 kB)
Using cached oscrypto-1.3.0-py2.py3-none-any.whl (194 kB)
Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Installing collected packages: asn1crypto, oscrypto
Successfully installed asn1crypto-1.5.1 oscrypto-1.3.0
$ python3
Python 3.9.6 (default, Feb  3 2024, 15:58:27)
[Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from oscrypto.tls import TLSSocket
>>> TLSSocket('www.debian.org', 443)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/odin/repos/sievemgr/foo/lib/python3.9/site-packages/oscrypto/_mac/tls.py", line 532, in __init__
    self._handshake()
  File "/Users/odin/repos/sievemgr/foo/lib/python3.9/site-packages/oscrypto/_mac/tls.py", line 654, in _handshake
    cipher_suite = int_to_bytes(supported_cipher_suite, width=2)
  File "/Users/odin/repos/sievemgr/foo/lib/python3.9/site-packages/asn1crypto/util.py", line 243, in int_to_bytes
    return value.to_bytes(width, byteorder='big', signed=signed)
OverflowError: int too big to convert

I can reproduce the issue with Python 3.13 installed via Homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant