snapshot) by Richard Hansen of BBN. Mostly the update is straightforward, with a bit more effort to avoid pthreads. (Threads are not ok because pam modules dlopen opensc, and pam modules are used from nonthreaded programs.) New in 0.13.0; 2012-12-04 * New card driver ePass2003. * OpenPGP card: greatly improved card driver and PKCS#15 emulation; implemented write (pkcs15init) mode; greatly enhanced documentation and tools. * ECDSA keys supported in 'read' and 'write' modes by internal PKCS#15 library, PKCS#11 and tools. * Minidriver in 'write' mode. * SM: secure messaging in GlobalPlatform-SP01 and CW14890 specifications; supported by ePass2003, IAS/ECC and AuthentIC cards; "ACL" and "APDU" modes to trigger secure messaging session; 'local' version of the external secure messaging module. * PKCS#15: support of 'secret-key' PKCS#15 objects support of 'authentication-object' PKCS#15 objects support of 'algReference' common key PKCS#15 attribute support of 'algReference' common key PKCS#15 attribute support of 'subjectName' common public key PKCS#15 attribute * PKCS#11: removed 'onepin' version of pkcs#11 module configuration options to expose slots for PINs and present on-card applications. support GOSTR3410 generate key mechanism * Support of PACE reader. * Remove libltdl reference. * ECDSA supported by MyEID card * New card driver for the SmartCard-HSM, a light-weight hardware security module * New useful commands in 'opensc-explorer' tool: 'find', 'put-data', ... * fixed SIGV issue due to the unsupported public key format * fixes for the number of documentation issues
17 lines
526 B
C
17 lines
526 B
C
$NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.3 2014/03/14 20:49:56 gdt Exp $
|
|
|
|
Use correct size for malloc.
|
|
|
|
Not yet reported upstream.
|
|
|
|
--- src/pkcs11/pkcs11-global.c.orig 2012-12-04 14:43:40.000000000 +0000
|
|
+++ src/pkcs11/pkcs11-global.c
|
|
@@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
|
|
#include <pthread.h>
|
|
CK_RV mutex_create(void **mutex)
|
|
{
|
|
- pthread_mutex_t *m = malloc(sizeof(*mutex));
|
|
+ pthread_mutex_t *m = malloc(sizeof(*m));
|
|
if (m == NULL)
|
|
return CKR_GENERAL_ERROR;;
|
|
pthread_mutex_init(m, NULL);
|