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

Diff for /src/usr.bin/ssh/ssh-keygen.c between version 1.373 and 1.374

version 1.373, 2019/11/25 00:57:27 version 1.374, 2019/12/10 22:37:20
Line 1715 
Line 1715 
         int r, i, fd, found, agent_fd = -1;          int r, i, fd, found, agent_fd = -1;
         u_int n;          u_int n;
         struct sshkey *ca, *public;          struct sshkey *ca, *public;
         char valid[64], *otmp, *tmp, *cp, *out, *comment, **plist = NULL;          char valid[64], *otmp, *tmp, *cp, *out, *comment;
           char *ca_fp = NULL, **plist = NULL;
         FILE *f;          FILE *f;
         struct ssh_identitylist *agent_ids;          struct ssh_identitylist *agent_ids;
         size_t j;          size_t j;
           struct notifier_ctx *notifier = NULL;
   
 #ifdef ENABLE_PKCS11  #ifdef ENABLE_PKCS11
         pkcs11_init(1);          pkcs11_init(1);
Line 1764 
Line 1766 
                 fatal("CA key type %s doesn't match specified %s",                  fatal("CA key type %s doesn't match specified %s",
                     sshkey_ssh_name(ca), key_type_name);                      sshkey_ssh_name(ca), key_type_name);
         }          }
           ca_fp = sshkey_fingerprint(ca, fingerprint_hash, SSH_FP_DEFAULT);
   
         for (i = 0; i < argc; i++) {          for (i = 0; i < argc; i++) {
                 /* Split list of principals */                  /* Split list of principals */
Line 1814 
Line 1817 
                                 fatal("Couldn't certify key %s via agent: %s",                                  fatal("Couldn't certify key %s via agent: %s",
                                     tmp, ssh_err(r));                                      tmp, ssh_err(r));
                 } else {                  } else {
                         if ((r = sshkey_certify(public, ca, key_type_name,                          if (sshkey_is_sk(ca) &&
                             sk_provider)) != 0)                              (ca->sk_flags & SSH_SK_USER_PRESENCE_REQD)) {
                                   notifier = notify_start(0,
                                       "Confirm user presence for key %s %s",
                                       sshkey_type(ca), ca_fp);
                           }
                           r = sshkey_certify(public, ca, key_type_name,
                               sk_provider);
                           notify_complete(notifier);
                           if (r != 0)
                                 fatal("Couldn't certify key %s: %s",                                  fatal("Couldn't certify key %s: %s",
                                     tmp, ssh_err(r));                                      tmp, ssh_err(r));
                 }                  }
Line 1853 
Line 1864 
                 if (cert_serial_autoinc)                  if (cert_serial_autoinc)
                         cert_serial++;                          cert_serial++;
         }          }
           free(ca_fp);
 #ifdef ENABLE_PKCS11  #ifdef ENABLE_PKCS11
         pkcs11_terminate();          pkcs11_terminate();
 #endif  #endif

Legend:
Removed from v.1.373  
changed lines
  Added in v.1.374