VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/SecurityToken.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/SecurityToken.cpp')
-rw-r--r--src/Common/SecurityToken.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Common/SecurityToken.cpp b/src/Common/SecurityToken.cpp
index 1bbad78e..bbcefe30 100644
--- a/src/Common/SecurityToken.cpp
+++ b/src/Common/SecurityToken.cpp
@@ -132,8 +132,8 @@ namespace VeraCrypt
{ CKA_CLASS, &dataClass, sizeof (dataClass) },
{ CKA_TOKEN, &trueVal, sizeof (trueVal) },
{ CKA_PRIVATE, &trueVal, sizeof (trueVal) },
- { CKA_LABEL, (CK_UTF8CHAR *) name.c_str(), name.size() },
- { CKA_VALUE, &keyfileData.front(), keyfileData.size() }
+ { CKA_LABEL, (CK_UTF8CHAR *) name.c_str(), (CK_ULONG) name.size() },
+ { CKA_VALUE, &keyfileData.front(), (CK_ULONG) keyfileData.size() }
};
CK_OBJECT_HANDLE keyfileHandle;
@@ -420,7 +420,7 @@ namespace VeraCrypt
else if (Sessions[slotId].UserLoggedIn)
return;
- CK_RV status = Pkcs11Functions->C_Login (Sessions[slotId].Handle, CKU_USER, (CK_CHAR_PTR) pin.c_str(), pin.size());
+ CK_RV status = Pkcs11Functions->C_Login (Sessions[slotId].Handle, CKU_USER, (CK_CHAR_PTR) pin.c_str(), (CK_ULONG) pin.size());
if (status != CKR_OK)
throw Pkcs11Exception (status);