diff -up ./src/common/pkcs11_lib.c.login_required ./src/common/pkcs11_lib.c
--- ./src/common/pkcs11_lib.c.login_required 2010-03-18 17:45:38.091458000 -0700
+++ ./src/common/pkcs11_lib.c 2010-03-18 17:48:24.498131000 -0700
@@ -662,6 +662,16 @@ int pkcs11_login(pkcs11_handle_t *h, cha
return (rv == SECSuccess) ? 0 : -1;
}
+int get_slot_login_required(pkcs11_handle_t *h)
+{
+ if (h->slot == NULL) {
+ DBG("Login failed: No Slot selected");
+ return -1;
+ }
+
+ return PK11_NeedLogin(h->slot);
+}
int close_pkcs11_session(pkcs11_handle_t *h)
{
if (h->slot) {