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

Diff for /src/usr.bin/ssh/ssh-add.c between version 1.107 and 1.108

version 1.107, 2013/12/15 18:17:26 version 1.108, 2013/12/19 00:10:30
Line 287 
Line 287 
 static int  static int
 update_card(AuthenticationConnection *ac, int add, const char *id)  update_card(AuthenticationConnection *ac, int add, const char *id)
 {  {
         char *pin;          char *pin = NULL;
         int ret = -1;          int ret = -1;
   
         pin = read_passphrase("Enter passphrase for PKCS#11: ", RP_ALLOW_STDIN);          if (add) {
         if (pin == NULL)                  if ((pin = read_passphrase("Enter passphrase for PKCS#11: ",
                 return -1;                      RP_ALLOW_STDIN)) == NULL)
                           return -1;
           }
   
         if (ssh_update_card(ac, add, id, pin, lifetime, confirm)) {          if (ssh_update_card(ac, add, id, pin == NULL ? "" : pin,
               lifetime, confirm)) {
                 fprintf(stderr, "Card %s: %s\n",                  fprintf(stderr, "Card %s: %s\n",
                     add ? "added" : "removed", id);                      add ? "added" : "removed", id);
                 ret = 0;                  ret = 0;

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108