TclPKCS11

Check-in [9a3f1ea155]
Login

Check-in [9a3f1ea155]

Overview
Comment:Updated to increase the reference count before calling Tcl_LoadFile(), which seems to be required
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9a3f1ea155b1f9009e0093788cd9e7158154bbabd33d54cf54490620e1673f83
User & Date: rkeene on 2015-10-05 10:56:34
Other Links: manifest | tags
Context
2015-10-05
10:56
TclPKCS11 0.9.10 check-in: 4ccd24b97f user: rkeene tags: release-0.9.10, trunk
10:56
Updated to increase the reference count before calling Tcl_LoadFile(), which seems to be required check-in: 9a3f1ea155 user: rkeene tags: trunk
2015-09-14
10:11
Added SetPIN support check-in: 658145fe85 user: rkeene tags: trunk
Changes

Modified tclpkcs11.c from [755f362790] to [f04afe6243].

419
420
421
422
423
424
425

426
427
428
429
430








431
432
433
434
435
436
437
419
420
421
422
423
424
425
426
427
428
429
430

431
432
433
434
435
436
437
438
439
440
441
442
443
444
445







+




-
+
+
+
+
+
+
+
+








/*
 * Platform Specific Functions 
 */
MODULE_SCOPE void *tclpkcs11_int_load_module(const char *pathname) {
#if defined(TCL_INCLUDES_LOADFILE)
	int tcl_rv;
	Tcl_Obj *pathnameObj;
	Tcl_LoadHandle *new_handle;

	new_handle = (Tcl_LoadHandle *) ckalloc(sizeof(*new_handle));

	tcl_rv = Tcl_LoadFile(NULL, Tcl_NewStringObj(pathname, -1), NULL, 0, NULL, new_handle);
	pathnameObj = Tcl_NewStringObj(pathname, -1);

	Tcl_IncrRefCount(pathnameObj);

	tcl_rv = Tcl_LoadFile(NULL, pathnameObj, NULL, 0, NULL, new_handle);

	Tcl_DecrRefCount(pathnameObj);

	if (tcl_rv != TCL_OK) {
		return(NULL);
	}

	return(new_handle);
#elif defined(HAVE_DLOPEN)
	return(dlopen(pathname, RTLD_NOW | RTLD_GLOBAL));