diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-14 08:09:44 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-14 08:09:44 +0000 |
commit | 3d423bbe963306259dac4e85a76e687292c72fc5 (patch) | |
tree | e8bdb455727a9788aa01791f2cced4be4ea4cce6 /pkcs11.c | |
parent | added *.orig to .svnignore (diff) | |
download | openvpn-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; |