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

Diff for /src/usr.bin/ssh/Attic/auth-rsa.c between version 1.60 and 1.60.2.2

version 1.60, 2004/06/21 17:36:31 version 1.60.2.2, 2005/09/02 03:44:59
Line 33 
Line 33 
 #include "hostfile.h"  #include "hostfile.h"
 #include "monitor_wrap.h"  #include "monitor_wrap.h"
 #include "ssh.h"  #include "ssh.h"
   #include "misc.h"
   
 /* import */  /* import */
 extern ServerOptions options;  extern ServerOptions options;
Line 49 
Line 50 
  *   options bits e n comment   *   options bits e n comment
  * where bits, e and n are decimal numbers,   * where bits, e and n are decimal numbers,
  * and comment is any string of characters up to newline.  The maximum   * and comment is any string of characters up to newline.  The maximum
  * length of a line is 8000 characters.  See the documentation for a   * length of a line is SSH_MAX_PUBKEY_BYTES characters.  See sshd(8) for a
  * description of the options.   * description of the options.
  */   */
   
Line 152 
Line 153 
 int  int
 auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)  auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
 {  {
         char line[8192], *file;          char line[SSH_MAX_PUBKEY_BYTES], *file;
         int allowed = 0;          int allowed = 0;
         u_int bits;          u_int bits;
         FILE *f;          FILE *f;
Line 201 
Line 202 
          * found, perform a challenge-response dialog to verify that the           * found, perform a challenge-response dialog to verify that the
          * user really has the corresponding private key.           * user really has the corresponding private key.
          */           */
         while (fgets(line, sizeof(line), f)) {          while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
                 char *cp;                  char *cp;
                 char *key_options;                  char *key_options;
                   int keybits;
   
                 linenum++;  
   
                 /* Skip leading whitespace, empty and comment lines. */                  /* Skip leading whitespace, empty and comment lines. */
                 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)                  for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
                         ;                          ;
Line 244 
Line 244 
                         continue;                          continue;
   
                 /* check the real bits  */                  /* check the real bits  */
                 if (bits != BN_num_bits(key->rsa->n))                  keybits = BN_num_bits(key->rsa->n);
                   if (keybits < 0 || bits != (u_int)keybits)
                         logit("Warning: %s, line %lu: keysize mismatch: "                          logit("Warning: %s, line %lu: keysize mismatch: "
                             "actual %d vs. announced %d.",                              "actual %d vs. announced %d.",
                             file, linenum, BN_num_bits(key->rsa->n), bits);                              file, linenum, BN_num_bits(key->rsa->n), bits);

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.60.2.2