Skip to content

Commit

Permalink
fix: Java honors ulMaxSessionCount constant and needs to create at le…
Browse files Browse the repository at this point in the history
…ast 2 sessions.

When used with Greengrass V2, at least 3 sessions are needed.
  • Loading branch information
JamieHunter committed Apr 12, 2022
1 parent 4cf67b4 commit 6457c1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pkcs11/pkcs11_token.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ CK_RV pkcs11_token_get_info(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo)
pInfo->ulMinPinLen = 0;
pInfo->flags = CKF_RNG;// | CKF_LOGIN_REQUIRED;

pInfo->ulMaxSessionCount = 1;
pInfo->ulMaxRwSessionCount = 1;
pInfo->ulMaxSessionCount = PKCS11_MAX_SESSIONS_ALLOWED;
pInfo->ulMaxRwSessionCount = PKCS11_MAX_SESSIONS_ALLOWED;

pInfo->ulSessionCount = (slot_ctx->session) ? TRUE : FALSE;
pInfo->ulRwSessionCount = (slot_ctx->session) ? TRUE : FALSE;
Expand Down

0 comments on commit 6457c1c

Please sign in to comment.