55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
From 1199ecd57dffdbc65c47baa61c4e836df5700244 Mon Sep 17 00:00:00 2001
|
|
From: NiteHawk <n1tehawk@users.noreply.github.com>
|
|
Date: Sun, 20 Jul 2025 18:31:49 +0200
|
|
Subject: [PATCH] [followup] Fix some oversights in previous commit
|
|
|
|
---
|
|
src/Mayaqua/Secure.c | 4 ++--
|
|
src/Mayaqua/Secure.h | 4 ++--
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/Mayaqua/Secure.c b/src/Mayaqua/Secure.c
|
|
index 7132f92a..da62f983 100644
|
|
--- a/src/Mayaqua/Secure.c
|
|
+++ b/src/Mayaqua/Secure.c
|
|
@@ -1710,7 +1710,7 @@ void CloseSecSession(SECURE *sec)
|
|
}
|
|
|
|
// Open the session
|
|
-bool OpenSecSession(SECURE *sec, UINT slot_number)
|
|
+bool OpenSecSession(SECURE *sec, CK_SLOT_ID slot_number)
|
|
{
|
|
UINT err = 0;
|
|
CK_SESSION_HANDLE session;
|
|
@@ -1835,7 +1835,7 @@ SECURE *OpenSec(UINT id)
|
|
return NULL;
|
|
}
|
|
|
|
- sec->SlotIdList = (CK_SLOT_ID *)ZeroMalloc(sizeof(UINT) * sec->NumSlot);
|
|
+ sec->SlotIdList = (CK_SLOT_ID *)ZeroMalloc(sizeof(CK_SLOT_ID) * sec->NumSlot);
|
|
|
|
if (sec->Api->C_GetSlotList(TRUE, sec->SlotIdList, &sec->NumSlot) != CKR_OK)
|
|
{
|
|
diff --git a/src/Mayaqua/Secure.h b/src/Mayaqua/Secure.h
|
|
index 649a8989..5cf574a4 100644
|
|
--- a/src/Mayaqua/Secure.h
|
|
+++ b/src/Mayaqua/Secure.h
|
|
@@ -162,7 +162,7 @@ struct SECURE
|
|
CK_SLOT_ID *SlotIdList; // Slot ID list
|
|
bool SessionCreated; // Session creation flags
|
|
UINT SessionId; // Session ID
|
|
- UINT SessionSlotNumber; // Slot ID of the session
|
|
+ CK_SLOT_ID SessionSlotNumber; // Slot ID of the session
|
|
bool LoginFlag; // Logged-in flag
|
|
SEC_INFO *Info; // Token information
|
|
LIST *EnumCache; // Enumeration cache
|
|
@@ -220,7 +220,7 @@ bool CheckSecureDeviceId(UINT id);
|
|
SECURE_DEVICE *GetSecureDevice(UINT id);
|
|
SECURE *OpenSec(UINT id);
|
|
void CloseSec(SECURE *sec);
|
|
-bool OpenSecSession(SECURE *sec, UINT slot_number);
|
|
+bool OpenSecSession(SECURE *sec, CK_SLOT_ID slot_number);
|
|
void CloseSecSession(SECURE *sec);
|
|
bool LoginSec(SECURE *sec, char *pin);
|
|
void LogoutSec(SECURE *sec);
|