[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.17 and 1.18

version 1.17, 2000/06/20 01:39:44 version 1.18, 2000/07/16 08:27:21
Line 15 
Line 15 
 #include "rsa.h"  #include "rsa.h"
 #include "ssh.h"  #include "ssh.h"
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "authfd.h"  
 #include "fingerprint.h"  #include "fingerprint.h"
 #include "key.h"  #include "key.h"
   #include "authfd.h"
 #include "authfile.h"  #include "authfile.h"
   
 void  void
Line 96 
Line 96 
         char buf[1024], msg[1024];          char buf[1024], msg[1024];
         int success;          int success;
         int interactive = isatty(STDIN_FILENO);          int interactive = isatty(STDIN_FILENO);
           int type = KEY_RSA;
   
           /*
            * try to load the public key. right now this only works for RSA,
            * since DSA keys are fully encrypted
            */
         public = key_new(KEY_RSA);          public = key_new(KEY_RSA);
         if (!load_public_key(filename, public, &saved_comment)) {          if (!load_public_key(filename, public, &saved_comment)) {
                 printf("Bad key file %s: %s\n", filename, strerror(errno));                  /* ok, so we will asume this is a DSA key */
                 return;                  type = KEY_DSA;
                   saved_comment = xstrdup(filename);
         }          }
         key_free(public);          key_free(public);
   
Line 112 
Line 118 
         }          }
   
         /* At first, try empty passphrase */          /* At first, try empty passphrase */
         private = key_new(KEY_RSA);          private = key_new(type);
         success = load_private_key(filename, "", private, &comment);          success = load_private_key(filename, "", private, &comment);
         if (!success) {          if (!success) {
                 printf("Need passphrase for %.200s\n", filename);                  printf("Need passphrase for %.200s\n", filename);
Line 144 
Line 150 
         }          }
         xfree(saved_comment);          xfree(saved_comment);
   
         if (ssh_add_identity(ac, private->rsa, comment))          if (ssh_add_identity(ac, private, comment))
                 fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);                  fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);
         else          else
                 fprintf(stderr, "Could not add identity: %s\n", filename);                  fprintf(stderr, "Could not add identity: %s\n", filename);

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18