libp11 icon indicating copy to clipboard operation
libp11 copied to clipboard

Is force_login supposed to prompt user to re-enter their PIN?

Open totszwai opened this issue 1 year ago • 0 comments

https://github.com/OpenSC/libp11/blob/master/src/eng_back.c#L211

Looking at the code, if force_login is set, and they are already logged in, it just returns true.

Shouldn't we force it to log out first if force_login is enabled?

+	if (ctx->force_login && slot_logged_in(ctx, slot))
+        	PKCS11_logout(slot);
+
 	if (!(ctx->force_login || tok->loginRequired) || slot_logged_in(ctx, slot))
 		return 1;

totszwai avatar Jun 21 '24 18:06 totszwai