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

EVP_KDF-SSHKDF example uses OSSL_KDF_PARAM_SALT instead of OSSL_KDF_PARAM_SSHKDF_SESSION_ID #16525

Closed
jvdsn opened this issue Sep 7, 2021 · 0 comments
Labels
branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch triaged: documentation The issue/pr deals with documentation (errors)

Comments

@jvdsn
Copy link
Contributor

jvdsn commented Sep 7, 2021

The code example in the documentation for EVP_KDF-SSHKDF (https://github.com/openssl/openssl/blob/master/doc/man7/EVP_KDF-SSHKDF.pod) uses the OSSL_KDF_PARAM_SALT parameter name to pass the session ID instead of OSSL_KDF_PARAM_SSHKDF_SESSION_ID.

*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
                                         session_id, (size_t)32);

Running the code example will result in an error ("missing session id"), see https://github.com/openssl/openssl/blob/master/providers/implementations/kdfs/sshkdf.c#L119. The example should be updated to use OSSL_KDF_PARAM_SSHKDF_SESSION_ID.

@jvdsn jvdsn added the issue: documentation The issue reports errors in (or missing) documentation label Sep 7, 2021
@t8m t8m added branch: 3.0 Merge to openssl-3.0 branch branch: master Merge to master branch triaged: documentation The issue/pr deals with documentation (errors) and removed issue: documentation The issue reports errors in (or missing) documentation labels Sep 7, 2021
paulidale added a commit to paulidale/openssl that referenced this issue Sep 7, 2021
A salt was being set instead of a session ID.

Fixes openssl#16525
openssl-machine pushed a commit that referenced this issue Sep 9, 2021
A salt was being set instead of a session ID.

Fixes #16525

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #16550)

(cherry picked from commit 8128013)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch triaged: documentation The issue/pr deals with documentation (errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants