@@ -169,20 +169,20 @@ START_TEST(test_cache_encrypt_no_secret) {
169169
170170 /* get cfg and temporarily remove the secret to simulate missing passphrase */
171171 oidc_cfg_t * cfg = oidc_test_cfg_get ();
172- const char * old_secret = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
172+ const char * old_secret = oidc_cfg_crypto_passphrase_secret1_get (cfg );
173173 cfg -> crypto_passphrase .secret1 = NULL ;
174174 cfg -> cache .encrypt = 1 ;
175175
176176 /* fail when value is too short and compression fails */
177177 ck_assert_int_eq (oidc_cache_set (r , OIDC_CACHE_SECTION_SESSION , "nokey" , "v" , expiry ), FALSE);
178178
179- /* do not fail when encryption is on but no secret is set (long enough value to compress) */
179+ /* fail when encryption is on but no secret is set (long enough value to compress) */
180180 ck_assert_int_eq (oidc_cache_set (r , OIDC_CACHE_SECTION_SESSION , "nokey" ,
181181 "vadadfsssssssssssssssssssssssssssssssssssssssssssssssssssssssss" , expiry ),
182- TRUE );
182+ FALSE );
183183
184- /* get should not fail because a secret should be generated */
185- ck_assert_int_eq (oidc_cache_get (r , OIDC_CACHE_SECTION_SESSION , "nokey" , & value ), TRUE );
184+ /* fail because no secret is set */
185+ ck_assert_int_eq (oidc_cache_get (r , OIDC_CACHE_SECTION_SESSION , "nokey" , & value ), FALSE );
186186
187187 /* restore secret */
188188 cfg -> crypto_passphrase .secret1 = (char * )old_secret ;
@@ -204,7 +204,7 @@ START_TEST(test_cache_second_passphrase_retry) {
204204
205205 /* prepare cfg and secrets */
206206 oidc_cfg_t * cfg = oidc_test_cfg_get ();
207- const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
207+ const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
208208 const char * old_s2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
209209 int old_encrypt = cfg -> cache .encrypt ;
210210
@@ -275,7 +275,7 @@ START_TEST(test_cache_secret1_empty_secret2_fallback) {
275275
276276 /* prepare cfg and secrets */
277277 oidc_cfg_t * cfg = oidc_test_cfg_get ();
278- const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
278+ const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
279279 const char * old_s2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
280280 int old_encrypt = cfg -> cache .encrypt ;
281281
@@ -342,7 +342,7 @@ START_TEST(test_cache_compression_enabled_set_get) {
342342 /* verify encryption+compression works by trying to create a JWT with the current cfg secret */
343343 oidc_cfg_t * cfg = oidc_test_cfg_get ();
344344 oidc_crypto_passphrase_t passphrase ;
345- passphrase .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
345+ passphrase .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
346346 passphrase .secret2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
347347 char * encoded = NULL ;
348348 apr_byte_t forced_no_compress = FALSE;
@@ -373,7 +373,7 @@ START_TEST(test_cache_compression_enabled_second_passphrase) {
373373
374374 /* prepare cfg and secrets */
375375 oidc_cfg_t * cfg = oidc_test_cfg_get ();
376- const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
376+ const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
377377 const char * old_s2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
378378 int old_encrypt = cfg -> cache .encrypt ;
379379
@@ -384,7 +384,7 @@ START_TEST(test_cache_compression_enabled_second_passphrase) {
384384
385385 /* verify encryption+compression works for this cfg; fall back to no-compress if not */
386386 oidc_crypto_passphrase_t passphrase ;
387- passphrase .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
387+ passphrase .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
388388 passphrase .secret2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
389389 char * encoded = NULL ;
390390 apr_byte_t forced_no_compress = FALSE;
@@ -433,7 +433,7 @@ START_TEST(test_cache_compression_enabled_empty_secret2_fallback) {
433433
434434 /* prepare cfg and secrets */
435435 oidc_cfg_t * cfg = oidc_test_cfg_get ();
436- const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
436+ const char * old_s1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
437437 const char * old_s2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
438438 int old_encrypt = cfg -> cache .encrypt ;
439439
@@ -443,7 +443,7 @@ START_TEST(test_cache_compression_enabled_empty_secret2_fallback) {
443443
444444 /* verify encryption+compression works; fall back to no-compress if not */
445445 oidc_crypto_passphrase_t passphrase2 ;
446- passphrase2 .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg , r );
446+ passphrase2 .secret1 = oidc_cfg_crypto_passphrase_secret1_get (cfg );
447447 passphrase2 .secret2 = oidc_cfg_crypto_passphrase_secret2_get (cfg );
448448 char * encoded2 = NULL ;
449449 apr_byte_t forced_no_compress = FALSE;
0 commit comments