server config FEATURE public API for hashing a password - #639
Open
niklas-moser wants to merge 1 commit into
Open
server config FEATURE public API for hashing a password#639niklas-moser wants to merge 1 commit into
niklas-moser wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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