Check-in [fb8686074b]
Overview
Comment:Better error handling without a PKCS#11 module
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fb8686074b529279c0c6095b2f340b9616beb821
User & Date: rkeene on 2016-03-15 19:53:46
Other Links: manifest | tags
Context
2017-03-22
21:11
Support wrapping for long lines Leaf check-in: 17d801292a user: rkeene tags: trunk
2016-03-15
19:53
Better error handling without a PKCS#11 module check-in: fb8686074b user: rkeene tags: trunk
19:51
Updated password saving to be less atomic but more consistently able to preserve ACLs, permissions, etc check-in: fe9b9c5e48 user: rkeene tags: trunk
Changes

Modified hunter2 from [ec608c91c1] to [6da8c360ca].

301
302
303
304
305
306
307
308
309
310

311
312
313
314
315
316
317
	set fd [open $fileName w 0600]
	puts $fd [join $output "\n"]
	close $fd
}

proc _listCertificates {} {
	if {![info exists ::env(PKCS11MODULE)]} {
		return [list]
	}


	set ::env(CACKEY_NO_EXTRA_CERTS) 1

	set handle [::pki::pkcs11::loadmodule $::env(PKCS11MODULE)]

	set slotInfo [list]
	foreach slot [::pki::pkcs11::listslots $handle] {
		set slotID [lindex $slot 0]







|


>







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
	set fd [open $fileName w 0600]
	puts $fd [join $output "\n"]
	close $fd
}

proc _listCertificates {} {
	if {![info exists ::env(PKCS11MODULE)]} {
		return -code error "ERROR: PKCS11MODULE environment variable is not set to your PKCS11 module"
	}

	# Hardcode some PKCS11 module workarounds
	set ::env(CACKEY_NO_EXTRA_CERTS) 1

	set handle [::pki::pkcs11::loadmodule $::env(PKCS11MODULE)]

	set slotInfo [list]
	foreach slot [::pki::pkcs11::listslots $handle] {
		set slotID [lindex $slot 0]