Repository navigation
Conversation
vszakats
marked this pull request as draft
June 21, 2024 14:46
vszakats
force-pushed
the
wolfssl-test-fail-2
branch
11 times, most recently
from
June 24, 2024 10:42
47ec537 to
c4c902c
Compare
vszakats
added a commit
that referenced
this pull request
Jun 24, 2024
Replace hard-coded crypto backends and rely on `LIBSSH2_GCM` macro to decide whether to run AES-GCM tests. Without this, build attempted to run AES-GCM tests (and failed) for crypto backends that have conditional support for this feature, e.g. wolfSSL without the necessary features built-in (as in before Homewbrew wolfssl 5.7.0_1, or OpenSSL v1.1.0 and older). This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Cherry-picked from #1407 Closes #1410
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Jun 24, 2024
Also re-enable tests in wolfSSL Linux CI jobs. That wolfSSL is v5.2.0, which is broken with AES-GCM enabled. This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Ref: libssh2#1020 Ref: libssh2#1299 Cherry-picked from libssh2#1407 Closes libssh2#1411
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Jun 24, 2024
Also re-enable tests in wolfSSL Linux CI jobs. That wolfSSL is v5.2.0, which is broken with AES-GCM enabled. This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Ref: libssh2#1020 Ref: libssh2#1299 Cherry-picked from libssh2#1407 Closes libssh2#1411
vszakats
added a commit
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
vszakats
force-pushed
the
wolfssl-test-fail-2
branch
3 times, most recently
from
June 24, 2024 14:15
7281258 to
68a91d8
Compare
EVP_Cipher() use with v5.6.0 and older
vszakats
marked this pull request as ready for review
June 24, 2024 14:34
To test the `EVP_Cipher()` workaround. 5.2.0: fail 5.3.0: fail 5.4.0: ok, but CMake build broken due to not installing sp_int.h 5.5.4: ok
Without this fix, these tests fail: ``` 29 - test_read-aes128-cbc (Failed) 30 - test_read-aes128-ctr (Failed) 32 - test_read-aes192-cbc (Failed) 33 - test_read-aes192-ctr (Failed) 34 - test_read-aes256-cbc (Failed) 35 - test_read-aes256-ctr (Failed) ``` Ref: https://github.com/libssh2/libssh2/actions/runs/9637944369/job/26577913950#step:18:8551 As tested with wolfSSL 5.4.0 built from source, with options identical to the wolfSSL 5.7.0 source build.
vszakats
force-pushed
the
wolfssl-test-fail-2
branch
from
June 24, 2024 14:50
68a91d8 to
83af42d
Compare
Member
Author
|
What remains a puzzle for another time is why "Due to the constraints of the API contract of this function it shouldn't be used in applications, please consider using EVP_CipherUpdate() and EVP_CipherFinal_ex() instead." |
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
Replace hard-coded crypto backends and rely on `LIBSSH2_GCM` macro to decide whether to run AES-GCM tests. Without this, build attempted to run AES-GCM tests (and failed) for crypto backends that have conditional support for this feature, e.g. wolfSSL without the necessary features built-in (as in before Homewbrew wolfssl 5.7.0_1, or OpenSSL v1.1.0 and older). This patch is part of a series of fixes to make wolfSSL AES-GCM support work together with libssh2. Cherry-picked from libssh2#1407 Closes libssh2#1410
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
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
Add workaround for the wolfSSL `EVP_Cipher(*p, NULL, NULL, 0)` bug to make libssh2 work with wolfSSL v5.6.0 and older. wolfSSL fixed this issue in v5.7.0: wolfSSL/wolfssl#7143 wolfSSL/wolfssl@b0de0a1 Without our local workaround: - v5.3.0 and older fail most tests: Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604211476#step:17:1263 - v5.4.0, v5.5.x, v5.6.0 fail these: ``` 29 - test_read-aes128-cbc (Failed) 30 - test_read-aes128-ctr (Failed) 32 - test_read-aes192-cbc (Failed) 33 - test_read-aes192-ctr (Failed) 34 - test_read-aes256-cbc (Failed) 35 - test_read-aes256-ctr (Failed) ``` Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604233819#step:17:978 Oddly enough the workaround breaks OpenSSL tests, so only enable it for the affected wolfSSL versions. Also add new build-from-source wolfSSL CI job to test the new codepath. wolfSSL has a build bug where `wolfssl/options.h` and `wolfssl/version.h` are not copied to the `install` destination with autotools. With CMake it has a different bug where `wolfcrypt/sp_int.h` is not copied (with v5.4.0). And another with CMake where `FIPS_mode()` remains missing (with v5.6.0 and earlier.) Therefore use CMake with v5.5.4 and a workaround for `FIPS_mode()`. Another option is autotools with v5.4.0 and a workaround for `install`, but CMake builds quicker. Regression-from 3c953c0 libssh2#797 Fixes libssh2#1020 Fixes libssh2#1299 Assisted-by: Michael Buckley via libssh2#1394 Closes libssh2#1394 (another attempt to fix the mentioned wolfSSL bug) Closes libssh2#1407
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.
Add workaround for the wolfSSL
EVP_Cipher(*p, NULL, NULL, 0)bug tomake libssh2 work with wolfSSL v5.6.0 and older.
wolfSSL fixed this issue in v5.7.0:
wolfSSL/wolfssl#7143
wolfSSL/wolfssl@b0de0a1
Without our local workaround:
v5.3.0 and older fail most tests:
Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604211476#step:17:1263
v5.4.0, v5.5.x, v5.6.0 fail these:
Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604233819#step:17:978
Oddly enough the workaround breaks OpenSSL tests, so only enable it for
the affected wolfSSL versions.
Also add new build-from-source wolfSSL CI job to test the new codepath.
wolfSSL has a build bug where
wolfssl/options.handwolfssl/version.hare not copied to theinstalldestination withautotools. With CMake it has a different bug where
wolfcrypt/sp_int.his not copied (with v5.4.0). And another with CMake where
FIPS_mode()remains missing (with v5.6.0 and earlier.)
Therefore use CMake with v5.5.4 and a workaround for
FIPS_mode().Another option is autotools with v5.4.0 and a workaround for
install,but CMake builds quicker.
Regression-from 3c953c0 #797
Fixes #1020
Fixes #1299
Assisted-by: Michael Buckley via #1394
Closes #1394 (another attempt to fix the mentioned wolfSSL bug)
Closes #1407