]> git.ipfire.org Git - thirdparty/gnutls.git/commit
pkcs11: properly fall back to thread-unsafe module init
authorDaiki Ueno <ueno@gnu.org>
Mon, 22 Dec 2025 06:29:06 +0000 (15:29 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 23 Dec 2025 01:27:31 +0000 (10:27 +0900)
commitf6680ada01ac8757f372cd7b97fd80e33c79c927
treec5699622244c94f1b6846a47510229623414cbc4
parent5ba03789cee4afa8cf4f06726343a19c0ec0a117
pkcs11: properly fall back to thread-unsafe module init

The PKCS#11 module initialization logic introduced in
aa5f15a872e62e54abe58624ee393e68d1faf689 first attempts to initialize
the module with CKR_NEED_TO_CREATE_THREADS|CKF_OS_LOCKING_OK, which
may return either CKR_CANT_LOCK or CKR_NEED_TO_CREATE_THREADS, where
the latter was previously treated as a hard error. This fixes it and
also makes the second attempt to not supply any flags.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
.gitignore
lib/pkcs11.c
tests/pkcs11/pkcs11-mock4.c