|
Lines 28-33
Link Here
|
| 28 |
#include <string.h> |
28 |
#include <string.h> |
| 29 |
#include <unistd.h> |
29 |
#include <unistd.h> |
| 30 |
#include <limits.h> |
30 |
#include <limits.h> |
|
|
31 |
#include <locale.h> |
| 31 |
|
32 |
|
| 32 |
#include "xmalloc.h" |
33 |
#include "xmalloc.h" |
| 33 |
#include "sshkey.h" |
34 |
#include "sshkey.h" |
|
Lines 47-52
Link Here
|
| 47 |
#include "atomicio.h" |
48 |
#include "atomicio.h" |
| 48 |
#include "krl.h" |
49 |
#include "krl.h" |
| 49 |
#include "digest.h" |
50 |
#include "digest.h" |
|
|
51 |
#include "utf8.h" |
| 50 |
|
52 |
|
| 51 |
#ifdef ENABLE_PKCS11 |
53 |
#ifdef ENABLE_PKCS11 |
| 52 |
#include "ssh-pkcs11.h" |
54 |
#include "ssh-pkcs11.h" |
|
Lines 829-835
fingerprint_one_key(const struct sshkey
Link Here
|
| 829 |
ra = sshkey_fingerprint(public, fingerprint_hash, SSH_FP_RANDOMART); |
831 |
ra = sshkey_fingerprint(public, fingerprint_hash, SSH_FP_RANDOMART); |
| 830 |
if (fp == NULL || ra == NULL) |
832 |
if (fp == NULL || ra == NULL) |
| 831 |
fatal("%s: sshkey_fingerprint failed", __func__); |
833 |
fatal("%s: sshkey_fingerprint failed", __func__); |
| 832 |
printf("%u %s %s (%s)\n", sshkey_size(public), fp, |
834 |
mprintf("%u %s %s (%s)\n", sshkey_size(public), fp, |
| 833 |
comment ? comment : "no comment", sshkey_type(public)); |
835 |
comment ? comment : "no comment", sshkey_type(public)); |
| 834 |
if (log_level >= SYSLOG_LEVEL_VERBOSE) |
836 |
if (log_level >= SYSLOG_LEVEL_VERBOSE) |
| 835 |
printf("%s\n", ra); |
837 |
printf("%s\n", ra); |
|
Lines 1150-1156
known_hosts_find_delete(struct hostkey_f
Link Here
|
| 1150 |
known_hosts_hash(l, ctx); |
1152 |
known_hosts_hash(l, ctx); |
| 1151 |
else if (print_fingerprint) { |
1153 |
else if (print_fingerprint) { |
| 1152 |
fp = sshkey_fingerprint(l->key, fptype, rep); |
1154 |
fp = sshkey_fingerprint(l->key, fptype, rep); |
| 1153 |
printf("%s %s %s %s\n", ctx->host, |
1155 |
mprintf("%s %s %s %s\n", ctx->host, |
| 1154 |
sshkey_type(l->key), fp, l->comment); |
1156 |
sshkey_type(l->key), fp, l->comment); |
| 1155 |
free(fp); |
1157 |
free(fp); |
| 1156 |
} else |
1158 |
} else |
|
Lines 1301-1307
do_change_passphrase(struct passwd *pw)
Link Here
|
| 1301 |
fatal("Failed to load key %s: %s", identity_file, ssh_err(r)); |
1303 |
fatal("Failed to load key %s: %s", identity_file, ssh_err(r)); |
| 1302 |
} |
1304 |
} |
| 1303 |
if (comment) |
1305 |
if (comment) |
| 1304 |
printf("Key has comment '%s'\n", comment); |
1306 |
mprintf("Key has comment '%s'\n", comment); |
| 1305 |
|
1307 |
|
| 1306 |
/* Ask the new passphrase (twice). */ |
1308 |
/* Ask the new passphrase (twice). */ |
| 1307 |
if (identity_new_passphrase) { |
1309 |
if (identity_new_passphrase) { |
|
Lines 2262-2267
main(int argc, char **argv)
Link Here
|
| 2262 |
|
2264 |
|
| 2263 |
OpenSSL_add_all_algorithms(); |
2265 |
OpenSSL_add_all_algorithms(); |
| 2264 |
log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); |
2266 |
log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); |
|
|
2267 |
|
| 2268 |
setlocale(LC_CTYPE, ""); |
| 2265 |
|
2269 |
|
| 2266 |
/* we need this for the home * directory. */ |
2270 |
/* we need this for the home * directory. */ |
| 2267 |
pw = getpwuid(getuid()); |
2271 |
pw = getpwuid(getuid()); |