Skip to content

Commit 6457c1c

Browse files
committed
fix: Java honors ulMaxSessionCount constant and needs to create at least 2 sessions.
When used with Greengrass V2, at least 3 sessions are needed.
1 parent 4cf67b4 commit 6457c1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pkcs11/pkcs11_token.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ CK_RV pkcs11_token_get_info(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo)
428428
pInfo->ulMinPinLen = 0;
429429
pInfo->flags = CKF_RNG;// | CKF_LOGIN_REQUIRED;
430430

431-
pInfo->ulMaxSessionCount = 1;
432-
pInfo->ulMaxRwSessionCount = 1;
431+
pInfo->ulMaxSessionCount = PKCS11_MAX_SESSIONS_ALLOWED;
432+
pInfo->ulMaxRwSessionCount = PKCS11_MAX_SESSIONS_ALLOWED;
433433

434434
pInfo->ulSessionCount = (slot_ctx->session) ? TRUE : FALSE;
435435
pInfo->ulRwSessionCount = (slot_ctx->session) ? TRUE : FALSE;

0 commit comments

Comments
 (0)