summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-11-09 22:34:15 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-11-09 22:34:15 +0100
commit339291fad94aebd17be116d17337eb49c6afb1cc (patch)
tree6786f0fe0711b254f2e064eada508f5d48c80eff /lib
parent4620c879250dcd6fba670c9028dd20fd4c376e32 (diff)
downloadgnutls-339291fad94aebd17be116d17337eb49c6afb1cc.tar.gz
do not traverse PKCS #11 tokens that were not requested.
Diffstat (limited to 'lib')
-rw-r--r--lib/pkcs11.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index 1192c8bbe5..a45cae06d2 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -992,6 +992,13 @@ _pkcs11_traverse_tokens (find_func_t find_func, void *input,
continue;
}
+ if (info != NULL)
+ {
+ if (!p11_kit_uri_match_token_info (info, &tinfo.tinfo) ||
+ !p11_kit_uri_match_module_info (info, &providers[x].info))
+ continue;
+ }
+
rv = (module)->C_OpenSession (slots[z],
((flags & SESSION_WRITE)
? CKF_RW_SESSION : 0) |