From 2958d3539aacd665eb8bd25b14c17bb31be00d73 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Thu, 26 Sep 2024 11:19:29 +0100 Subject: [PATCH] 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.