version 1.98.2.2, 2003/04/03 22:35:18 |
version 1.100, 2002/06/19 00:27:55 |
|
|
|
|
snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name); |
snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name); |
fprintf(stderr, "%s (%s): ", prompt, identity_file); |
fprintf(stderr, "%s (%s): ", prompt, identity_file); |
|
fflush(stderr); |
if (fgets(buf, sizeof(buf), stdin) == NULL) |
if (fgets(buf, sizeof(buf), stdin) == NULL) |
exit(1); |
exit(1); |
if (strchr(buf, '\n')) |
if (strchr(buf, '\n')) |
|
|
} |
} |
fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); |
fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); |
fprintf(stdout, |
fprintf(stdout, |
"Comment: \"%u-bit %s, converted from OpenSSH by %s@%s\"\n", |
"Comment: \"%d-bit %s, converted from OpenSSH by %s@%s\"\n", |
key_size(k), key_type(k), |
key_size(k), key_type(k), |
pw->pw_name, hostname); |
pw->pw_name, hostname); |
dump_base64(stdout, blob, len); |
dump_base64(stdout, blob, len); |
|
|
public = key_load_public(identity_file, &comment); |
public = key_load_public(identity_file, &comment); |
if (public != NULL) { |
if (public != NULL) { |
fp = key_fingerprint(public, fptype, rep); |
fp = key_fingerprint(public, fptype, rep); |
printf("%u %s %s\n", key_size(public), fp, comment); |
printf("%d %s %s\n", key_size(public), fp, comment); |
key_free(public); |
key_free(public); |
xfree(comment); |
xfree(comment); |
xfree(fp); |
xfree(fp); |
|
|
if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) { |
if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) { |
int quoted = 0; |
int quoted = 0; |
comment = cp; |
comment = cp; |
for (; *cp && (quoted || (*cp != ' ' && |
for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { |
*cp != '\t')); cp++) { |
|
if (*cp == '\\' && cp[1] == '"') |
if (*cp == '\\' && cp[1] == '"') |
cp++; /* Skip both */ |
cp++; /* Skip both */ |
else if (*cp == '"') |
else if (*cp == '"') |
|
|
} |
} |
comment = *cp ? cp : comment; |
comment = *cp ? cp : comment; |
fp = key_fingerprint(public, fptype, rep); |
fp = key_fingerprint(public, fptype, rep); |
printf("%u %s %s\n", key_size(public), fp, |
printf("%d %s %s\n", key_size(public), fp, |
comment ? comment : "no comment"); |
comment ? comment : "no comment"); |
xfree(fp); |
xfree(fp); |
key_free(public); |
key_free(public); |