Repository navigation
Fix another AES-GCM EVP control command issue. - #5205
Merged
Merged
Conversation
With PR 5170, I added logic that requires a EVP_CTRL_GCM_SET_IV_FIXED command be issued before a EVP_CTRL_GCM_IV_GEN command. This matches OpenSSL's behavior. However, OpenSSL also clears the flag enabling EVP_CTRL_GCM_IV_GEN after EVP_CTRL_GCM_SET_IV_FIXED if EVP_CipherInit is called with a NULL key. Otherwise, the flag retains its value. We didn't mirror this logic, and that caused problems in OpenSSH unit testing. This commit aligns our logic with OpenSSL's and adds a regression test to test_evp_cipher_aes_gcm for this case.
dgarske
approved these changes
Jun 3, 2022
vszakats
added a commit
to libssh2/libssh2
that referenced
this pull request
Jun 24, 2024
Earlier versions crash while running tests. This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Possibly related is this wolfSSL bugfix patch, released in v5.4.0: wolfSSL/wolfssl#5205 wolfSSL/wolfssl@fb3c611 "Fix another AES-GCM EVP control command issue" Ref: #1020 Ref: #1299 Cherry-picked from #1407 Closes #1411
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
Earlier versions crash while running tests. This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Possibly related is this wolfSSL bugfix patch, released in v5.4.0: wolfSSL/wolfssl#5205 wolfSSL/wolfssl@fb3c611 "Fix another AES-GCM EVP control command issue" Ref: libssh2#1020 Ref: libssh2#1299 Cherry-picked from libssh2#1407 Closes libssh2#1411
vszakats
added a commit
to libssh2/libssh2
that referenced
this pull request
Jun 17, 2026
To enable support AES-GCM for both, and ed25519 for LibreSSL. wolfSSL requires this version for AES-GCM due to bug: wolfSSL/wolfssl#5205 (Before this, libssh2 tests crash with AES-GCM enabled) Also: - openssl: add in-source version check for LibreSSL, OpenSSL and wolfSSL. - openssl: include `openssl/opensslv.h` to rely on other headers pulling it in. - cmake: add version check for wolfSSL. - mbedtls: do the in-source version check earlier. To match openssl. - sync up wording for #error messages Follow-up to 16ef3a2 #2008 Closes #2073
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.
Description
With PR 5170, I added logic that requires a EVP_CTRL_GCM_SET_IV_FIXED command be issued before a EVP_CTRL_GCM_IV_GEN command. This matches OpenSSL's behavior. However, OpenSSL also clears the flag enabling EVP_CTRL_GCM_IV_GEN after EVP_CTRL_GCM_SET_IV_FIXED if EVP_CipherInit is called with a NULL key. Otherwise, the flag retains its value. We didn't mirror this logic, and that caused problems in OpenSSH unit testing. This commit aligns our logic with OpenSSL's and adds a regression test to test_evp_cipher_aes_gcm for this case.
Testing
Checklist