version 1.60.2.2, 2005/09/02 03:44:59 |
version 1.61, 2004/12/06 11:41:03 |
|
|
#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; |
|
|
while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { |
while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { |
char *cp; |
char *cp; |
char *key_options; |
char *key_options; |
int keybits; |
|
|
|
/* 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++) |
|
|
continue; |
continue; |
|
|
/* check the real bits */ |
/* check the real bits */ |
keybits = BN_num_bits(key->rsa->n); |
if (bits != 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); |