Skip to content

server config FEATURE public API for hashing a password - #639

Open
niklas-moser wants to merge 1 commit into
CESNET:develfrom
niklas-moser:export-password-hashing
Open

server config FEATURE public API for hashing a password#639
niklas-moser wants to merge 1 commit into
CESNET:develfrom
niklas-moser:export-password-hashing

Conversation

@niklas-moser

@niklas-moser niklas-moser commented Sep 7, 2026

Copy link
Copy Markdown

Splits the salt generation and the crypt(3) call out of nc_server_config_add_ssh_user_password() into a public nc_server_config_hash_password(). No behaviour change.

Today the logic is only reachable through a function that builds an entire ietf-netconf-server subtree around the result. A caller that wants just the digest has to duplicate the crypt code and take on a libcrypt dependency of its own — which is what CESNET/Netopeer2# would otherwise have to do.

Motivation is: O-RAN WG11 R004, and 3GPP TS 33.117 clause 4.2.3.4.3.1 behind it, don't let a deployment ship clear-text credentials in a datastore, so Netopeer2 has to hash a "$0$" password at commit time

Split the salt generation and the crypt(3) call out of
nc_server_config_add_ssh_user_password() into a public
nc_server_config_hash_password(). No behaviour change.

Lets a caller get just the digest, without building an
ietf-netconf-server subtree around it or duplicating the crypt code and
its libcrypt dependency.
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.

1 participant