oscrypto icon indicating copy to clipboard operation
oscrypto copied to clipboard

Strange error when I try to create a TLSSocket Connection

Open vivekhub opened this issue 2 years ago • 0 comments

Using Oscrypto 1.3.0 on a mac M1, I am getting a really strange error when I open a TLSSocket. Something I am doing wrong here? This works on an Intel Mac

Python 3.9.12 (main, Mar 26 2022, 15:44:31) 
[Clang 13.1.6 (clang-1316.0.21.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from oscrypto import tls
>>> t=tls.TLSSession(manual_validation=True)
>>> c = tls.TLSSocket('www.google.com', 443, session=t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/vivekv/Library/Caches/pypoetry/virtualenvs/digital-resilience-pmVk26sL-py3.9/lib/python3.9/site-packages/oscrypto/_mac/tls.py", line 532, in __init__
    self._handshake()
  File "/Users/vivekv/Library/Caches/pypoetry/virtualenvs/digital-resilience-pmVk26sL-py3.9/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/vivekv/Library/Caches/pypoetry/virtualenvs/digital-resilience-pmVk26sL-py3.9/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
>>> 

vivekhub avatar Apr 14 '22 10:04 vivekhub