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

Diff for /src/usr.bin/ssh/Attic/sshconnect1.c between version 1.64 and 1.65

version 1.64, 2006/03/25 13:17:02 version 1.65, 2006/04/25 08:02:27
Line 197 
Line 197 
         BIGNUM *challenge;          BIGNUM *challenge;
         Key *public, *private;          Key *public, *private;
         char buf[300], *passphrase, *comment, *authfile;          char buf[300], *passphrase, *comment, *authfile;
         int i, type, quit;          int i, perm_ok = 1, type, quit;
   
         public = options.identity_keys[idx];          public = options.identity_keys[idx];
         authfile = options.identity_files[idx];          authfile = options.identity_files[idx];
Line 243 
Line 243 
         if (public->flags & KEY_FLAG_EXT)          if (public->flags & KEY_FLAG_EXT)
                 private = public;                  private = public;
         else          else
                 private = key_load_private_type(KEY_RSA1, authfile, "", NULL);                  private = key_load_private_type(KEY_RSA1, authfile, "", NULL,
         if (private == NULL && !options.batch_mode) {                      &perm_ok);
           if (private == NULL && !options.batch_mode && perm_ok) {
                 snprintf(buf, sizeof(buf),                  snprintf(buf, sizeof(buf),
                     "Enter passphrase for RSA key '%.100s': ", comment);                      "Enter passphrase for RSA key '%.100s': ", comment);
                 for (i = 0; i < options.number_of_password_prompts; i++) {                  for (i = 0; i < options.number_of_password_prompts; i++) {
                         passphrase = read_passphrase(buf, 0);                          passphrase = read_passphrase(buf, 0);
                         if (strcmp(passphrase, "") != 0) {                          if (strcmp(passphrase, "") != 0) {
                                 private = key_load_private_type(KEY_RSA1,                                  private = key_load_private_type(KEY_RSA1,
                                     authfile, passphrase, NULL);                                      authfile, passphrase, NULL, NULL);
                                 quit = 0;                                  quit = 0;
                         } else {                          } else {
                                 debug2("no passphrase given, try next key");                                  debug2("no passphrase given, try next key");
Line 268 
Line 269 
         xfree(comment);          xfree(comment);
   
         if (private == NULL) {          if (private == NULL) {
                 if (!options.batch_mode)                  if (!options.batch_mode && perm_ok)
                         error("Bad passphrase.");                          error("Bad passphrase.");
   
                 /* Send a dummy response packet to avoid protocol error. */                  /* Send a dummy response packet to avoid protocol error. */

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65