]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added gnutls_pkcs11_token_get_flags() to distinguish between hardware and soft tokens.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 22 May 2010 08:34:00 +0000 (10:34 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 3 Jun 2010 17:52:32 +0000 (19:52 +0200)
lib/pkcs11.c

index da0e4e19aa71b3e03d450d3950ba23e0b0fde099..207eb5048e6ccf73ed64c8bed37040f1e65e4d40 100644 (file)
@@ -52,6 +52,11 @@ struct flags_find_data_st {
     unsigned int slot_flags;
 };
 
+struct flags_find_data_st {
+    struct pkcs11_url_info info;
+    unsigned int slot_flags;
+};
+
 struct crt_find_data_st {
     gnutls_pkcs11_obj_t *p_list;
     unsigned int* n_list;
@@ -1549,7 +1554,6 @@ int pkcs11_login(pakchois_session_t *pks, struct token_info *info)
     /* force login on HW tokens. Some tokens will not list private keys
      * if login has not been performed.
      */
-//    if (!(info->sinfo.flags & CKF_HW_SLOT) && (info->tinfo.flags & CKF_LOGIN_REQUIRED) == 0) {
     if ((info->tinfo.flags & CKF_LOGIN_REQUIRED) == 0) {
         gnutls_assert();
         _gnutls_debug_log( "pk11: No login required.\n");
@@ -1620,7 +1624,6 @@ int pkcs11_login(pakchois_session_t *pks, struct token_info *info)
     return (rv == CKR_OK || rv == CKR_USER_ALREADY_LOGGED_IN) ? 0 : GNUTLS_E_PKCS11_ERROR;
 }
 
-
 static int find_privkeys(pakchois_session_t *pks, struct token_info* info, struct pkey_list *list)
 {
     struct ck_attribute a[3];