Skip to content

Commit

Permalink
feat: implement C_GetSessionInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
nkraetzschmar authored and JackOfMostTrades committed Jan 16, 2025
1 parent e6a4574 commit ae3fa67
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion aws_kms_pkcs11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,15 @@ CK_RV C_CloseAllSessions(CK_SLOT_ID slotID) {
return CKR_FUNCTION_FAILED;
}

CK_RV C_GetSessionInfo(CK_SESSION_HANDLE, CK_SESSION_INFO_PTR) {
CK_RV C_GetSessionInfo(CK_SESSION_HANDLE hSession, CK_SESSION_INFO_PTR pInfo) {
CkSession *session = (CkSession*)hSession;
if (session == NULL) {
return CKR_SESSION_HANDLE_INVALID;
}
memset(pInfo, 0, sizeof(*pInfo));
pInfo->slotID = session->slot_id;
pInfo->state = CKS_RW_USER_FUNCTIONS;
pInfo->flags = CKF_RW_SESSION | CKF_SERIAL_SESSION;
return CKR_OK;
}

Expand Down

0 comments on commit ae3fa67

Please sign in to comment.