Skip to content

Commit

Permalink
FIPS and KTLS may interfere
Browse files Browse the repository at this point in the history
New Linux kernels (>= 5.11) enable KTLS CHACHA which is not
FIPS-suitable.

Fixes openssl#16657

Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#16658)

(cherry picked from commit a5d8a2f)
  • Loading branch information
beldmit committed Sep 24, 2021
1 parent f8543a0 commit 5b89626
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@ jobs:
- name: make test
run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}

fips_and_ktls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: modprobe tls
run: sudo modprobe tls
- name: config
run: ./config --banner=Configured --strict-warnings enable-ktls enable-fips && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}

no-legacy:
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 10 additions & 0 deletions test/sslapitest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,11 @@ static int execute_test_ktls(int cis_ktls, int sis_ktls,
goto end;
}

if (is_fips && strstr(cipher, "CHACHA") != NULL) {
testresult = TEST_skip("CHACHA is not supported in FIPS");
goto end;
}

/* Create a session based on SHA-256 */
if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(),
TLS_client_method(),
Expand Down Expand Up @@ -1292,6 +1297,11 @@ static int execute_test_ktls_sendfile(int tls_version, const char *cipher)
goto end;
}

if (is_fips && strstr(cipher, "CHACHA") != NULL) {
testresult = TEST_skip("CHACHA is not supported in FIPS");
goto end;
}

/* Create a session based on SHA-256 */
if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(),
TLS_client_method(),
Expand Down

0 comments on commit 5b89626

Please sign in to comment.