TclPKCS11

Check-in [f16ee55999]
Login

Check-in [f16ee55999]

Overview
Comment:Fixed issue with threads
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f16ee55999964e2836e319f522627c53fc867fff555b31498e2b08dac87692be
User & Date: rkeene on 2011-06-30 00:06:09
Other Links: manifest | tags
Context
2011-06-30
00:23
TclPKCS11 0.9.9 check-in: a049dfe777 user: rkeene tags: release-0.9.9, trunk
00:06
Fixed issue with threads check-in: f16ee55999 user: rkeene tags: trunk
2011-06-29
23:56
Fixed bug with finalizing Encrypt/Sign operations check-in: e7904ef06a user: rkeene tags: trunk
Changes

Modified tclpkcs11.c from [b28d164d97] to [d1d4644b83].

324
325
326
327
328
329
330


331
332
333
334


335
336
337
338
339
340


341
342
343
344


345
346
347
348
349
350


351
352
353
354


355
356
357
358
359
360
361
362

	*mutex = retval;

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_lock_mutex(void *mutex) {


	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}



	Tcl_MutexLock(*mutex);

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_unlock_mutex(void *mutex) {


	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}



	Tcl_MutexUnlock(*mutex);

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_destroy_mutex(void *mutex) {


	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}



	Tcl_MutexFinalize(*mutex);
	ckfree(mutex);

	return(CKR_OK);
}

/* Convience function to start a session if one is not already active */
MODULE_SCOPE int tclpkcs11_start_session(struct tclpkcs11_handle *handle, CK_SLOT_ID slot) {







>
>




>
>
|





>
>




>
>
|





>
>




>
>
|







324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374

	*mutex = retval;

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_lock_mutex(void *mutex) {
	Tcl_Mutex *tcl_mutex;

	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}

	tcl_mutex = mutex;

	Tcl_MutexLock(tcl_mutex);

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_unlock_mutex(void *mutex) {
	Tcl_Mutex *tcl_mutex;

	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}

	tcl_mutex = mutex;

	Tcl_MutexUnlock(tcl_mutex);

	return(CKR_OK);
}

MODULE_SCOPE CK_RV tclpkcs11_destroy_mutex(void *mutex) {
	Tcl_Mutex *tcl_mutex;

	if (!mutex) {
		return(CKR_GENERAL_ERROR);
	}

	tcl_mutex = mutex;

	Tcl_MutexFinalize(tcl_mutex);
	ckfree(mutex);

	return(CKR_OK);
}

/* Convience function to start a session if one is not already active */
MODULE_SCOPE int tclpkcs11_start_session(struct tclpkcs11_handle *handle, CK_SLOT_ID slot) {