From 56abd9324ba15f5a96aee58a8742175cfdf69f04 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Thu, 26 Sep 2024 10:58:59 +0100 Subject: [PATCH 1/3] Specify exact OTP version --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 0753941..1473d4f 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - otp: [24] + otp: [24.3.4.17] os: [ubuntu-latest] steps: From d055d0b7887aa4e1818ebfff544a2231e5e2c84d Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Thu, 26 Sep 2024 11:07:39 +0100 Subject: [PATCH 2/3] Revert "Specify exact OTP version" This reverts commit 56abd9324ba15f5a96aee58a8742175cfdf69f04. --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 1473d4f..0753941 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - otp: [24.3.4.17] + otp: [24] os: [ubuntu-latest] steps: From 57314ac3c4143ce523c0e2916c85a5116c61d665 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Thu, 26 Sep 2024 11:19:29 +0100 Subject: [PATCH 3/3] Only run mochiweb_session tests if OTP25 on GHA As it will use OpenSSL - and OTP 24 has missing fix for OpenSSL. Mochiweb in Riak makes no use of mochiweb_session. --- src/mochiweb_session.erl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mochiweb_session.erl b/src/mochiweb_session.erl index 042731f..42db3e2 100644 --- a/src/mochiweb_session.erl +++ b/src/mochiweb_session.erl @@ -162,6 +162,17 @@ gen_hmac(ExpirationTime, Data, SessionKey, Key) -> -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). +-if(?OTP_RELEASE >= 25). +-define(SSL_TEST_OK, true). +-else. +-ifdef(GITHUBEXCLUDE). +-define(SSL_TEST_OK, false). +-else. +-define(SSL_TEST_OK, true). +-endif. +-endif. + +-if(?SSL_TEST_OK). generate_check_session_cookie_test_() -> {setup, fun setup_server_key/0, @@ -227,3 +238,5 @@ generate_check_session_cookie([ServerKey, TS]) -> TS, Id, ServerKey)) ]. -endif. + +-endif.