TclPKCS11

Check-in [634ecd11da]
Login

Check-in [634ecd11da]

Overview
Comment:Updated unload to be more forgiving about the state of the PKCS11 module Fixed issue with determining flags for dynamic linking
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 634ecd11da517acd9eeb11165c53a218c14c25aa4e4ca9c3d94a6472b3457128
User & Date: rkeene on 2010-10-10 19:05:39
Other Links: manifest | tags
Context
2010-10-10
19:10
Updated to create a pkgIndex.tcl from the configure script check-in: b579486d80 user: rkeene tags: trunk
19:05
Updated unload to be more forgiving about the state of the PKCS11 module Fixed issue with determining flags for dynamic linking check-in: 634ecd11da user: rkeene tags: trunk
18:06
Added pre-release script Fixed issue with sanity check check-in: 712876ec1c user: rkeene tags: trunk
Changes

Modified configure.ac from [6386d49ecc] to [c5cbcefa78].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
19
20
21
22
23
24
25
dnl Define ourselves
AC_INIT(tclpkcs11, 1.0)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_GNU_SOURCE

dnl Determine system information
DC_CHK_OS_INFO




dnl Perform Tcl Extension required stuff
TCLEXT_INIT

dnl Determine how to make shared objects
DC_GET_SHOBJFLAGS

dnl Find out if we have the functions needed to open shared objects
AC_SEARCH_LIBS(dlopen, dl,, [
	AC_SEARCH_LIBS(shl_load, dld dl)
])
AC_CHECK_FUNCS(dlopen shl_load)

dnl Look for appropriate headers











>
>
>




<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18



19
20
21
22
23
24
25
dnl Define ourselves
AC_INIT(tclpkcs11, 1.0)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_GNU_SOURCE

dnl Determine system information
DC_CHK_OS_INFO

dnl Determine how to make shared objects
DC_GET_SHOBJFLAGS

dnl Perform Tcl Extension required stuff
TCLEXT_INIT




dnl Find out if we have the functions needed to open shared objects
AC_SEARCH_LIBS(dlopen, dl,, [
	AC_SEARCH_LIBS(shl_load, dld dl)
])
AC_CHECK_FUNCS(dlopen shl_load)

dnl Look for appropriate headers

Modified tclpkcs11.c from [c3ee986c0c] to [428601fccc].

621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
	if (!handle) {
		Tcl_SetObjResult(interp, Tcl_NewStringObj("invalid handle", -1));

		return(TCL_ERROR);
	}

	/* Log out of the PKCS11 module */
	chk_rv = handle->pkcs11->C_Logout(handle->session);
	if (chk_rv != CKR_OK) {
		Tcl_SetObjResult(interp, tclpkcs11_pkcs11_error(chk_rv));

		return(TCL_ERROR);
	}

	/* Close the session, cleaning up all the session objects */
	chk_rv = tclpkcs11_close_session(handle);
	if (chk_rv != CKR_OK) {
		Tcl_SetObjResult(interp, tclpkcs11_pkcs11_error(chk_rv));

		return(TCL_ERROR);
	}

	/* Ask the PKCS#11 Provider to terminate */
	chk_rv = handle->pkcs11->C_Finalize(NULL);
	if (chk_rv != CKR_OK) {
		Tcl_SetObjResult(interp, tclpkcs11_pkcs11_error(chk_rv));

		return(TCL_ERROR);







|
<
<

<
<
<

|
<
<
<
<
<







621
622
623
624
625
626
627
628


629



630
631





632
633
634
635
636
637
638
	if (!handle) {
		Tcl_SetObjResult(interp, Tcl_NewStringObj("invalid handle", -1));

		return(TCL_ERROR);
	}

	/* Log out of the PKCS11 module */
	handle->pkcs11->C_Logout(handle->session);






	/* Close the session, cleaning up all the session objects */
	tclpkcs11_close_session(handle);






	/* Ask the PKCS#11 Provider to terminate */
	chk_rv = handle->pkcs11->C_Finalize(NULL);
	if (chk_rv != CKR_OK) {
		Tcl_SetObjResult(interp, tclpkcs11_pkcs11_error(chk_rv));

		return(TCL_ERROR);