test/psk: add compat vector for OpenSSL < 3.2#1059
Closed
hreinecke wants to merge 1 commit intolinux-nvme:masterfrom
Closed
test/psk: add compat vector for OpenSSL < 3.2#1059hreinecke wants to merge 1 commit intolinux-nvme:masterfrom
hreinecke wants to merge 1 commit intolinux-nvme:masterfrom
Conversation
cleech
reviewed
Sep 3, 2025
| * existing 'info' string. So add the resulting 'compat' | ||
| * identity hash vector here to make the tests succeed. | ||
| */ | ||
| #ifdef OPENSSL_VERSION_MINOR <= 1 |
Contributor
There was a problem hiding this comment.
this doesn't compile, should be an #if
Contributor
|
I haven't tested at all these boundaries, but I think the conditional should be after looking through all the openssl git release branches to find the back-ports |
Older OpenSSL versions have a bug where EVP_PKEY_CTX_add1_hkdf_info() will always overwrite the existing 'info' value, and thus calculate a different identity hash. This issue has been uncovered by the PSK testcases, and has always been present. We have fixed this with eff0ffe ("linux: fix HKDF TLS key derivation back to OpenSSL 3.0.8"), but the PSK testcases will still fail. So add the resulting hash values for the 'compat' test, and select the correct test vector based on the OpenSSL version. Signed-off-by: Hannes Reinecke <[email protected]>
0082fc8 to
d3b4dd5
Compare
Collaborator
Author
Not on my system; 3.1.4 doesn't have the issue. Fixed up the version numbers to convince the test case to pass. |
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.
OpenSSL versions earlier than 3.2 have a bug where EVP_PKEY_CTX_add1_hkdf_info() will always overwrite the existing 'info' value, and thus calculate a different identity hash. This issue has been uncovered by the PSK testcases, and has always been present.
We have fixed this with eff0ffe ("linux: fix HKDF TLS key derivation back to OpenSSL 3.0.8"), but the PSK testcases will still fail. So add the resulting hash values for the 'compat' test, and select the correct test vector based on the OpenSSL version.
Fixes: #1053