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

add python bindings #7509

Merged
merged 2 commits into from
Sep 14, 2023
Merged

add python bindings #7509

merged 2 commits into from
Sep 14, 2023

Conversation

rcarpa
Copy link
Contributor

@rcarpa rcarpa commented Aug 28, 2023

No description provided.

@rcarpa rcarpa changed the title add set_ssl_certificate_buffer to python bindings add python bindings Aug 29, 2023
@arvidn
Copy link
Owner

arvidn commented Sep 3, 2023

have you tried to use these functions from python as well?

@rcarpa
Copy link
Contributor Author

rcarpa commented Sep 5, 2023

Good point. I actually didn't. For some reason I assumed it's as simple as just exposing these bindings and that's all. Is it more tricky than that ?

@arvidn
Copy link
Owner

arvidn commented Sep 5, 2023

type conversions are performed at run-time in python, not compile-time. So it may still fail when running it in python

@rcarpa
Copy link
Contributor Author

rcarpa commented Sep 5, 2023

Just tried the functions from python. Both work as expected.

  • ssl_listen_port returns an integer (0 if not listening on the ssl socket)
  • set_ssl_certificate_buffer works correctly when passing strings or bytes with pem-encoded content. I successfully transferred files between two instances of a (patched) Deluge using an encrypted connection.

To be noted that set_ssl_certificate_buffer accepts (without any errors) strings containing invalid data. It only results in silent failures to establish the SSL connection. However, this is not something specific to the python bindings.

@arvidn arvidn merged commit 5ce4c51 into arvidn:RC_2_0 Sep 14, 2023
42 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants