Do smart card drivers generally support more than one PKCS#11 session?

Stef Walter stefw at
Thu Jun 9 12:37:35 PDT 2011

I'm working on integrating smart card support via PKCS#11 into glib and 
gcr (part of gnome-keyring). We're integrating with GnuTLS for TLS support.

I'd like to be able to do a C_Login in my code, and then pass off the 
URL to Gnutls. GnuTLS would then open another session, recognize that 
we're already logged in (this may need a slight tweak in the gnutls 
code) and then proceed without prompting the user.

The reason for this is that the gnutls callback for prompting the user 
to login is a global one, and hard to use from another library without 
assuming that the caller is the only gnutls consumer.

Anyway, this all works well. But it relies on the assumption of having 
two sessions open on the smart card at once.

So my question is if, in the experience of all you smart card gurus, 
most PKCS#11 smart card drivers (at least those worth supporting) 
support more than one session in the same application.



More information about the p11-glue mailing list