Skip to content

Commit 2d9fd92

Browse files
committed
fix tests for client_secret_jwt and private_key_jwt
so encoded JWT comparison works for cjose >= 0.6.2 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent e154c9a commit 2d9fd92

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
04/16/2022
2+
- fix tests for client_secret_jwt and private_key_jwt so encoded JWT comparison works for cjose >= 0.6.2
3+
14
03/06/2022
25
- add support for OpenSSL 3.0; closes #31
36
- bump to 1.5.0dev

test/check_oauth2.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@ START_TEST(test_oauth2_auth_client_secret_jwt)
241241
str, "urn:ietf:params:oauth:client-assertion-type:jwt-bearer");
242242
str = oauth2_nv_list_get(_log, post, "client_assertion");
243243
ck_assert_ptr_ne(str, NULL);
244-
ck_assert(
245-
strncmp(str, "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.",
246-
strlen("eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.")) == 0);
244+
ck_assert(strncmp(str, "eyJhbGciO", strlen("eyJhbGciO")) == 0);
247245
oauth2_nv_list_free(_log, post);
248246

249247
test_oauth_auth_clone(auth);
@@ -332,9 +330,7 @@ START_TEST(test_oauth2_auth_private_key_jwt)
332330
str, "urn:ietf:params:oauth:client-assertion-type:jwt-bearer");
333331
str = oauth2_nv_list_get(_log, post, "client_assertion");
334332
ck_assert_ptr_ne(str, NULL);
335-
ck_assert(
336-
strncmp(str, "eyJhbGciOiAiUlMyNTYiLCAidHlwIjogIkpXVCJ9.",
337-
strlen("eyJhbGciOiAiUlMyNTYiLCAidHlwIjogIkpXVCJ9.")) == 0);
333+
ck_assert(strncmp(str, "eyJhbGciOi", strlen("eyJhbGciOi")) == 0);
338334
oauth2_nv_list_free(_log, post);
339335

340336
test_oauth_auth_clone(auth);

0 commit comments

Comments
 (0)