Skip to content

Enhance PyNUTClient with SSL (NUT STARTTLS) support and test it#3352

Merged
jimklimov merged 20 commits intonetworkupstools:masterfrom
jimklimov:pynut-ssl
Mar 20, 2026
Merged

Enhance PyNUTClient with SSL (NUT STARTTLS) support and test it#3352
jimklimov merged 20 commits intonetworkupstools:masterfrom
jimklimov:pynut-ssl

Conversation

@jimklimov
Copy link
Copy Markdown
Member

@jimklimov jimklimov commented Mar 16, 2026

Partially addresses issues:

AI DISCLAIMER: Prepared with contributions from IntelliJ Junie

…p(), and reasons to abort net_starttls()

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ing sockets [networkupstools#3331]

Apply same retry detection and loop logic as for handshake;
standardize on `SSL_IO_MAX_RETRIES` constant name for these operations.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…able SSL_ERROR_WANT_{WRITE,READ}, log less loudly [networkupstools#3331]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added this to the 2.8.5 milestone Mar 16, 2026
@jimklimov jimklimov added this to NUT QA Mar 16, 2026
@jimklimov jimklimov added enhancement CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) python SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters portability We want NUT to build and run everywhere possible labels Mar 16, 2026
@AppVeyorBot
Copy link
Copy Markdown

@jimklimov jimklimov added the AI For good or bad, machine tools are upon us. Humans are still the responsible ones. label Mar 18, 2026
@jimklimov
Copy link
Copy Markdown
Member Author

Seems python-3.13+ includes much stricter rules about certificate validation, and we generate something not up to its spec (not all extensions it wants) at least for the CA certificate.

…ERIFY to be numbers [networkupstools#1711, networkupstools#1600]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d python OpenSSL handling) [networkupstools#1600, networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…CERTVERIFY to accept numbers [networkupstools#1711, networkupstools#1600]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… required nowadays by many crypto implementations [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

…cates, exit() upon errors; invert WITHOUT_SSL_TESTS=>WITH_SSL_TESTS with more options [networkupstools#1711]

Support now `make check-NIT WITH_SSL_TESTS=required-conditional` to fail
fast if crypto material setup failed (ignored if built without SSL).

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… self-signed CA cert [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…der Python libs [networkupstools#1711, networkupstools#1600]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…TS=required (to abort if NUT was built without SSL support) [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…UT was built with SSL support) but needed third-party tooling was not found for SSL setup [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…edora 43 setup [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov moved this to In Progress in NUT QA Mar 19, 2026
@jimklimov jimklimov merged commit 26c9c19 into networkupstools:master Mar 20, 2026
66 of 67 checks passed
@jimklimov jimklimov deleted the pynut-ssl branch March 20, 2026 19:03
@jimklimov jimklimov moved this from In Progress to Done in NUT QA Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) enhancement portability We want NUT to build and run everywhere possible python SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants