aboutsummaryrefslogtreecommitdiff
path: root/pkcs11.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-14 08:09:44 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-14 08:09:44 +0000
commit3d423bbe963306259dac4e85a76e687292c72fc5 (patch)
treee8bdb455727a9788aa01791f2cced4be4ea4cce6 /pkcs11.c
parentadded *.orig to .svnignore (diff)
downloadopenvpn-3d423bbe963306259dac4e85a76e687292c72fc5.tar.xz
Minor PKCS#11 changes.
pre-2.1_beta3 git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@607 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'pkcs11.c')
-rw-r--r--pkcs11.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkcs11.c b/pkcs11.c
index 25ad525..d0bdbbe 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -1068,8 +1068,8 @@ pkcs11_createSession (
if (rv == CKR_OK) {
pkcs11_session->fLoginFailed = false;
- pkcs11_session->key = -1;
- pkcs11_session->session = -1;
+ pkcs11_session->key = (CK_OBJECT_HANDLE)-1;
+ pkcs11_session->session = (CK_SESSION_HANDLE)-1;
if (!strcmp (szSlotType, "id")) {
rv = _pkcs11_getSlotById (pkcs11_session, szSlot);
@@ -1210,11 +1210,11 @@ pkcs11_logout (
) {
ASSERT (pkcs11_session!=NULL);
- if (pkcs11_session->session != (unsigned int)-1) {
+ if (pkcs11_session->session != (CK_SESSION_HANDLE)-1) {
pkcs11_session->provider->f->C_Logout (pkcs11_session->session);
pkcs11_session->provider->f->C_CloseSession (pkcs11_session->session);
- pkcs11_session->key = -1;
- pkcs11_session->session = -1;
+ pkcs11_session->key = (CK_OBJECT_HANDLE)-1;
+ pkcs11_session->session = (CK_SESSION_HANDLE)-1;
}
return CKR_OK;