Skip to content

Introduce NUT "authconf" file support [#3329, #3411]#3435

Open
jimklimov wants to merge 87 commits into
networkupstools:masterfrom
jimklimov:issue-3329
Open

Introduce NUT "authconf" file support [#3329, #3411]#3435
jimklimov wants to merge 87 commits into
networkupstools:masterfrom
jimklimov:issue-3329

Conversation

@jimklimov

@jimklimov jimklimov commented May 11, 2026

Copy link
Copy Markdown
Member

Starting with a PoC from AI, slightly modified (20%?) in review, following the spec requested in the GitHub issue #3329, as a stepping stone for further work. Also address parts of issue #3411.

Let CI loose on this iteration that passes locally...

TODO:

UPDATE: During work on this, it was found that NSS CERTHOST support was actually broken, and only worked for certificates whose nicknames matched the host name, not the "My nut server" nickname as the example claimed for years. Fixed now.

UPDATE: During work on this, it was found that it may be troublesome for a single client to connect to multiple NUT data servers which would require different CA trust stores and/or client self-identification by certificates. To be investigated under #3494, not in scope here.

@jimklimov jimklimov added this to the 2.8.6 milestone May 11, 2026
@jimklimov jimklimov added enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels May 11, 2026
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 33afb88 is temporarily available: NUT-tarballs-PR-3435.zip.

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4693-master completed (commit 049a4d4c36 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4694-master completed (commit c8f40b4384 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4696-master completed (commit 25660e3752 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4697-master completed (commit 9be8443368 by @jimklimov)

Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Fixed
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Comment thread clients/authconf.c Dismissed
Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
@jimklimov jimklimov force-pushed the issue-3329 branch 2 times, most recently from 73a7249 to ed6f549 Compare May 12, 2026 14:05
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4700-master completed (commit 8a8a16fc63 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4701-master completed (commit 40e1ff94b4 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Comment thread clients/authconf.c Fixed
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@jimklimov jimklimov changed the title Introduce NUT "authconf" file support [#3329] Introduce NUT "authconf" file support [#3329, #3411] Jun 18, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added 13 commits June 23, 2026 02:14
… SO_MAJOR_LIB* version hassle

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…_scan_ip_range_nut_authconf() and nutscan_scan_nut_authconf() with nutscan_nut_authconf_t argument [networkupstools#3329]

Make old methods wrappers of the new ones, so existing libnutscan clients
continue working as they were (no breaking ABI change, just new methods).

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…present in libupsclient build we try to use [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etect desired timeout like other NUT clients do [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etect and load NUT auth conf file like other clients do [networkupstools#3329]

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

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ed list manipulation, and methods to remove items from list [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…scanning "old nut" servers [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…if positive [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…onf_update_conn_flags() [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…thout SSL [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…t-ness of freed strings [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Comment thread clients/upsclient.c Dismissed
Comment thread clients/upslog.c Dismissed
Comment thread tools/nut-scanner/scan_nut.c Dismissed
…for SSL-capable builds [networkupstools#3329]

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

Copy link
Copy Markdown
Member Author

At this point the PR should be roughly feature-complete for the C library and in-tree clients, including nut-scanner and dummy-ups.

Testing would be most welcome, there are probably edge cases (especially for clients that handle numerous connections, even if they do not try to put on different hats for different servers per #3494) not yet encountered.

Other language bindings to follow in a separate PR, probably - still cooking.

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

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. enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants