-
Notifications
You must be signed in to change notification settings - Fork 76
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
smbprotocol.connection.Connection.connect() no longer shows the low-level connection error #259
Comments
Thanks for the pickup, the error should contain the original error message like before. |
I have only now upgraded from smbprotocol==1.5.1 as I was still on Python 2.7 :( Beside this error, there was only another minor issue with I am running end to end tests with just NTLM for Samba, Windows 2018, Windows 2019 and Azure Files. Many thanks for maintaining this library :) I am still at |
Unfortunately this is a side effect of the poor choices I made when I first created this library. I made too many things public when I probably shouldn't have. In this case SMB 3.11 introduced the ability to select a difference encryption cipher during negotiation so instead of using AES CCM it can negotiate things like AES256 GCM and so on. Granted this is technically a breaking change but I am curious what you were using the Happy to amend the changelog and while I'll try to not do these things in the future I cannot guarantee that will always be the case. |
You can update the changelog, as a drive by, but I guess not many people were using it. Don't worry too much about the API. I think it might also be safe to make the or I am using it for audit, to log the negociated encryption algorithm. |
I forgot to mention. I plan to create a PR for this by the start of the next week. |
Since 1.11.0 smbprotocol.connection.Connection.connect() no longer shows the low-level connection error
This is a change introduced in 1.11.0
The change is in transport.py
v1.10.1...v1.11.0#diff-1037611d131586bd4201108e4c80be46a17a6a1a365766e7190be44673eac0ffL70
It helps to know more about why a connection failed... it can be a DNS error for example.
To reproduce, use this code
On 1.11.0 the error is just
ValueError: Failed to connect to 'localhost:1234'
On 1.10.1 the error is
ValueError: Failed to connect to 'localhost:1234': [Errno 111] Connection refused
Below are the stack traces
1.11.0
1.10.1
The text was updated successfully, but these errors were encountered: