version 1.58, 2004/08/23 11:48:09 |
version 1.58.2.1, 2005/03/10 16:28:27 |
|
|
#include "log.h" |
#include "log.h" |
#include "authfile.h" |
#include "authfile.h" |
#include "rsa.h" |
#include "rsa.h" |
|
#include "misc.h" |
|
|
/* Version identification string for SSH v1 identity files. */ |
/* Version identification string for SSH v1 identity files. */ |
static const char authfile_id_string[] = |
static const char authfile_id_string[] = |
|
|
key_try_load_public(Key *k, const char *filename, char **commentp) |
key_try_load_public(Key *k, const char *filename, char **commentp) |
{ |
{ |
FILE *f; |
FILE *f; |
char line[4096]; |
char line[SSH_MAX_PUBKEY_BYTES]; |
char *cp; |
char *cp; |
|
u_long linenum = 0; |
|
|
f = fopen(filename, "r"); |
f = fopen(filename, "r"); |
if (f != NULL) { |
if (f != NULL) { |
while (fgets(line, sizeof(line), f)) { |
while (read_keyfile_line(f, filename, line, sizeof(line), |
line[sizeof(line)-1] = '\0'; |
&linenum) != -1) { |
cp = line; |
cp = line; |
switch (*cp) { |
switch (*cp) { |
case '#': |
case '#': |