[BACK]Return to ssh-pkcs11.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-pkcs11.c between version 1.51 and 1.52

version 1.51, 2020/10/18 11:32:02 version 1.52, 2020/11/22 22:38:26
Line 36 
Line 36 
 #include "misc.h"  #include "misc.h"
 #include "sshkey.h"  #include "sshkey.h"
 #include "ssh-pkcs11.h"  #include "ssh-pkcs11.h"
   #include "digest.h"
 #include "xmalloc.h"  #include "xmalloc.h"
   
 struct pkcs11_slotinfo {  struct pkcs11_slotinfo {
Line 1057 
Line 1058 
 }  }
 #endif  #endif
   
   static void
   note_key(struct pkcs11_provider *p, CK_ULONG slotidx, const char *context,
       struct sshkey *key)
   {
           char *fp;
   
           if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
               SSH_FP_DEFAULT)) == NULL) {
                   error_f("sshkey_fingerprint failed");
                   return;
           }
           debug2("%s: provider %s slot %lu: %s %s", context, p->name,
               (u_long)slotidx, sshkey_type(key), fp);
           free(fp);
   }
   
 /*  /*
  * lookup certificates for token in slot identified by slotidx,   * lookup certificates for token in slot identified by slotidx,
  * add 'wrapped' public keys to the 'keysp' array and increment nkeys.   * add 'wrapped' public keys to the 'keysp' array and increment nkeys.
Line 1132 
Line 1149 
                             ck_cert_type);                              ck_cert_type);
                         continue;                          continue;
                 }                  }
                   note_key(p, slotidx, __func__, key);
                 if (pkcs11_key_included(keysp, nkeys, key)) {                  if (pkcs11_key_included(keysp, nkeys, key)) {
                           debug2_f("key already included");;
                         sshkey_free(key);                          sshkey_free(key);
                 } else {                  } else {
                         /* expand key array and add key */                          /* expand key array and add key */
Line 1243 
Line 1261 
                         error("failed to fetch key");                          error("failed to fetch key");
                         continue;                          continue;
                 }                  }
                   note_key(p, slotidx, __func__, key);
                 if (pkcs11_key_included(keysp, nkeys, key)) {                  if (pkcs11_key_included(keysp, nkeys, key)) {
                           debug2_f("key already included");;
                         sshkey_free(key);                          sshkey_free(key);
                 } else {                  } else {
                         /* expand key array and add key */                          /* expand key array and add key */

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52