Permalink
Browse files

Merge remote-tracking branch 'ludovic/master' into proposed

  • Loading branch information...
2 parents 78adc76 + a59ded7 commit ea4eee5dc2a1b39646e86b216512e1234fce75c1 @martinpaljak martinpaljak committed Jun 28, 2011
Showing with 13 additions and 78 deletions.
  1. +2 −2 src/common/libscdl.c
  2. +2 −2 src/libopensc/ctx.c
  3. +1 −1 src/pkcs11/pkcs11-object.c
  4. +8 −4 src/pkcs11/pkcs11-session.c
  5. +0 −69 src/pkcs11/pkcs11-spy.exports
@@ -75,15 +75,15 @@ int sc_dlclose(void *handle)
/* Use native interfaces */
void *sc_dlopen(const char *filename)
{
- return (void *)dlopen(filename, RTLD_LAZY);
+ return dlopen(filename, RTLD_LAZY);
}
void *sc_dlsym(void *handle, const char *symbol)
{
return dlsym(handle, symbol);
}
-const char *sc_dlerror()
+const char *sc_dlerror(void)
{
return dlerror();
}
View
@@ -676,9 +676,9 @@ int sc_context_create(sc_context_t **ctx_out, const sc_context_param_t *parm)
ctx->reader_driver = sc_get_cardmod_driver();
}
#endif
-#elif ENABLE_CTAPI
+#elif defined(ENABLE_CTAPI)
ctx->reader_driver = sc_get_ctapi_driver();
-#elif ENABLE_OPENCT
+#elif defined(ENABLE_OPENCT)
ctx->reader_driver = sc_get_openct_driver();
#endif
@@ -484,10 +484,10 @@ CK_RV C_Digest(CK_SESSION_HANDLE hSession, /* the session's handle */
struct sc_pkcs11_session *session;
rv = sc_pkcs11_lock();
- sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_Digest(hSession=0x%lx)", hSession);
if (rv != CKR_OK)
return rv;
+ sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_Digest(hSession=0x%lx)", hSession);
rv = get_session(hSession, &session);
if (rv != CKR_OK)
goto out;
@@ -137,11 +137,14 @@ CK_RV C_CloseSession(CK_SESSION_HANDLE hSession)
{ /* the session's handle */
CK_RV rv;
+ rv = sc_pkcs11_lock();
+ if (rv != CKR_OK)
+ return rv;
+
sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_CloseSession(0x%lx)\n", hSession);
- rv = sc_pkcs11_lock();
- if (rv == CKR_OK)
- rv = sc_pkcs11_close_session(hSession);
+ rv = sc_pkcs11_close_session(hSession);
+
sc_pkcs11_unlock();
return rv;
}
@@ -151,11 +154,12 @@ CK_RV C_CloseAllSessions(CK_SLOT_ID slotID)
CK_RV rv;
struct sc_pkcs11_slot *slot;
- sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_CloseAllSessions(0x%lx)\n", slotID);
rv = sc_pkcs11_lock();
if (rv != CKR_OK)
return rv;
+ sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_CloseAllSessions(0x%lx)\n", slotID);
+
rv = slot_get_token(slotID, &slot);
if (rv != CKR_OK)
goto out;
@@ -1,70 +1 @@
-C_CancelFunction
-C_CloseAllSessions
-C_CloseSession
-C_CopyObject
-C_CreateObject
-C_Decrypt
-C_DecryptDigestUpdate
-C_DecryptFinal
-C_DecryptInit
-C_DecryptUpdate
-C_DecryptVerifyUpdate
-C_DeriveKey
-C_DestroyObject
-C_Digest
-C_DigestEncryptUpdate
-C_DigestFinal
-C_DigestInit
-C_DigestKey
-C_DigestUpdate
-C_Encrypt
-C_EncryptFinal
-C_EncryptInit
-C_EncryptUpdate
-C_Finalize
-C_FindObjects
-C_FindObjectsFinal
-C_FindObjectsInit
-C_GenerateKey
-C_GenerateKeyPair
-C_GenerateRandom
-C_GetAttributeValue
C_GetFunctionList
-C_GetFunctionStatus
-C_GetInfo
-C_GetMechanismInfo
-C_GetMechanismList
-C_GetObjectSize
-C_GetOperationState
-C_GetSessionInfo
-C_GetSlotInfo
-C_GetSlotList
-C_GetTokenInfo
-C_InitPIN
-C_InitToken
-C_Initialize
-C_LoadModule
-C_Login
-C_Logout
-C_OpenSession
-C_SeedRandom
-C_SetAttributeValue
-C_SetOperationState
-C_SetPIN
-C_Sign
-C_SignEncryptUpdate
-C_SignFinal
-C_SignInit
-C_SignRecover
-C_SignRecoverInit
-C_SignUpdate
-C_UnloadModule
-C_UnwrapKey
-C_Verify
-C_VerifyFinal
-C_VerifyInit
-C_VerifyRecover
-C_VerifyRecoverInit
-C_VerifyUpdate
-C_WaitForSlotEvent
-C_WrapKey

0 comments on commit ea4eee5

Please sign in to comment.