Symbol: hostkeys
usr.bin/ssh/auth.c
375
struct hostkeys *hostkeys;
usr.bin/ssh/auth.c
378
hostkeys = init_hostkeys();
usr.bin/ssh/auth.c
379
load_hostkeys(hostkeys, host, sysfile, 0);
usr.bin/ssh/auth.c
393
load_hostkeys(hostkeys, host, user_hostfile, 0);
usr.bin/ssh/auth.c
398
host_status = check_key_in_hostkeys(hostkeys, key, &found);
usr.bin/ssh/auth.c
408
free_hostkeys(hostkeys);
usr.bin/ssh/hostfile.c
213
struct hostkeys *
usr.bin/ssh/hostfile.c
216
struct hostkeys *ret = xcalloc(1, sizeof(*ret));
usr.bin/ssh/hostfile.c
225
struct hostkeys *hostkeys;
usr.bin/ssh/hostfile.c
232
struct hostkeys *hostkeys = ctx->hostkeys;
usr.bin/ssh/hostfile.c
246
if ((tmp = recallocarray(hostkeys->entries, hostkeys->num_entries,
usr.bin/ssh/hostfile.c
247
hostkeys->num_entries + 1, sizeof(*hostkeys->entries))) == NULL)
usr.bin/ssh/hostfile.c
249
hostkeys->entries = tmp;
usr.bin/ssh/hostfile.c
250
hostkeys->entries[hostkeys->num_entries].host = xstrdup(ctx->host);
usr.bin/ssh/hostfile.c
251
hostkeys->entries[hostkeys->num_entries].file = xstrdup(l->path);
usr.bin/ssh/hostfile.c
252
hostkeys->entries[hostkeys->num_entries].line = l->linenum;
usr.bin/ssh/hostfile.c
253
hostkeys->entries[hostkeys->num_entries].key = l->key;
usr.bin/ssh/hostfile.c
255
hostkeys->entries[hostkeys->num_entries].marker = l->marker;
usr.bin/ssh/hostfile.c
256
hostkeys->entries[hostkeys->num_entries].note = l->note;
usr.bin/ssh/hostfile.c
257
hostkeys->num_entries++;
usr.bin/ssh/hostfile.c
264
load_hostkeys_file(struct hostkeys *hostkeys, const char *host,
usr.bin/ssh/hostfile.c
272
ctx.hostkeys = hostkeys;
usr.bin/ssh/hostfile.c
284
load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path,
usr.bin/ssh/hostfile.c
294
load_hostkeys_file(hostkeys, host, path, f, note);
usr.bin/ssh/hostfile.c
299
free_hostkeys(struct hostkeys *hostkeys)
usr.bin/ssh/hostfile.c
303
for (i = 0; i < hostkeys->num_entries; i++) {
usr.bin/ssh/hostfile.c
304
free(hostkeys->entries[i].host);
usr.bin/ssh/hostfile.c
305
free(hostkeys->entries[i].file);
usr.bin/ssh/hostfile.c
306
sshkey_free(hostkeys->entries[i].key);
usr.bin/ssh/hostfile.c
307
explicit_bzero(hostkeys->entries + i, sizeof(*hostkeys->entries));
usr.bin/ssh/hostfile.c
309
free(hostkeys->entries);
usr.bin/ssh/hostfile.c
310
freezero(hostkeys, sizeof(*hostkeys));
usr.bin/ssh/hostfile.c
314
check_key_not_revoked(struct hostkeys *hostkeys, struct sshkey *k)
usr.bin/ssh/hostfile.c
319
for (i = 0; i < hostkeys->num_entries; i++) {
usr.bin/ssh/hostfile.c
320
if (hostkeys->entries[i].marker != MRK_REVOKE)
usr.bin/ssh/hostfile.c
322
if (sshkey_equal_public(k, hostkeys->entries[i].key))
usr.bin/ssh/hostfile.c
326
hostkeys->entries[i].key))
usr.bin/ssh/hostfile.c
348
check_hostkeys_by_key_or_type(struct hostkeys *hostkeys,
usr.bin/ssh/hostfile.c
359
for (i = 0; i < hostkeys->num_entries; i++) {
usr.bin/ssh/hostfile.c
360
if (hostkeys->entries[i].marker != want_marker)
usr.bin/ssh/hostfile.c
363
if (hostkeys->entries[i].key->type != keytype)
usr.bin/ssh/hostfile.c
367
hostkeys->entries[i].key->ecdsa_nid != nid)
usr.bin/ssh/hostfile.c
371
*found = hostkeys->entries + i;
usr.bin/ssh/hostfile.c
372
k = hostkeys->entries[i].key;
usr.bin/ssh/hostfile.c
377
hostkeys->entries[i].key)) {
usr.bin/ssh/hostfile.c
381
*found = hostkeys->entries + i;
usr.bin/ssh/hostfile.c
385
if (sshkey_equal(k, hostkeys->entries[i].key)) {
usr.bin/ssh/hostfile.c
388
*found = hostkeys->entries + i;
usr.bin/ssh/hostfile.c
394
*found = hostkeys->entries + i;
usr.bin/ssh/hostfile.c
397
if (check_key_not_revoked(hostkeys, k) != 0) {
usr.bin/ssh/hostfile.c
406
check_key_in_hostkeys(struct hostkeys *hostkeys, struct sshkey *key,
usr.bin/ssh/hostfile.c
411
return check_hostkeys_by_key_or_type(hostkeys, key, 0, -1, found);
usr.bin/ssh/hostfile.c
415
lookup_key_in_hostkeys_by_type(struct hostkeys *hostkeys, int keytype, int nid,
usr.bin/ssh/hostfile.c
418
return (check_hostkeys_by_key_or_type(hostkeys, NULL, keytype, nid,
usr.bin/ssh/hostfile.c
423
lookup_marker_in_hostkeys(struct hostkeys *hostkeys, int want_marker)
usr.bin/ssh/hostfile.c
427
for (i = 0; i < hostkeys->num_entries; i++) {
usr.bin/ssh/hostfile.c
428
if (hostkeys->entries[i].marker == (HostkeyMarker)want_marker)
usr.bin/ssh/hostfile.h
38
struct hostkeys *init_hostkeys(void);
usr.bin/ssh/hostfile.h
39
void load_hostkeys(struct hostkeys *, const char *,
usr.bin/ssh/hostfile.h
41
void load_hostkeys_file(struct hostkeys *, const char *,
usr.bin/ssh/hostfile.h
43
void free_hostkeys(struct hostkeys *);
usr.bin/ssh/hostfile.h
45
HostStatus check_key_in_hostkeys(struct hostkeys *, struct sshkey *,
usr.bin/ssh/hostfile.h
47
int lookup_key_in_hostkeys_by_type(struct hostkeys *, int, int,
usr.bin/ssh/hostfile.h
49
int lookup_marker_in_hostkeys(struct hostkeys *, int);
usr.bin/ssh/monitor.c
540
struct sshbuf *m = NULL, *inc = NULL, *hostkeys = NULL;
usr.bin/ssh/monitor.c
563
hostkeys = pack_hostkeys();
usr.bin/ssh/monitor.c
588
(r = sshbuf_put_stringb(m, hostkeys)) != 0 ||
usr.bin/ssh/monitor.c
603
sshbuf_free(hostkeys);
usr.bin/ssh/ssh-add.c
695
struct hostkeys *hostkeys;
usr.bin/ssh/ssh-add.c
722
hostkeys = init_hostkeys();
usr.bin/ssh/ssh-add.c
726
load_hostkeys(hostkeys, host, path, 0);
usr.bin/ssh/ssh-add.c
731
for (i = 0; i < hostkeys->num_entries; i++) {
usr.bin/ssh/ssh-add.c
732
hke = hostkeys->entries + i;
usr.bin/ssh/ssh-add.c
752
free_hostkeys(hostkeys);
usr.bin/ssh/sshconnect.c
1601
show_other_keys(struct hostkeys *hostkeys, struct sshkey *key)
usr.bin/ssh/sshconnect.c
1616
if (!lookup_key_in_hostkeys_by_type(hostkeys, type[i],
usr.bin/ssh/sshconnect.c
67
static int show_other_keys(struct hostkeys *, struct sshkey *);
usr.bin/ssh/sshconnect.c
829
load_hostkeys_command(struct hostkeys *hostkeys, const char *command_template,
usr.bin/ssh/sshconnect.c
888
load_hostkeys_file(hostkeys, hostfile_hostname, tag, f, 1);
usr.bin/ssh/sshconnect.c
932
struct hostkeys *host_hostkeys, *ip_hostkeys;
usr.bin/ssh/sshconnect.h
52
struct hostkeys;
usr.bin/ssh/sshconnect.h
99
void load_hostkeys_command(struct hostkeys *, const char *,
usr.bin/ssh/sshconnect2.c
121
struct hostkeys *hostkeys = NULL;
usr.bin/ssh/sshconnect2.c
127
hostkeys = init_hostkeys();
usr.bin/ssh/sshconnect2.c
129
load_hostkeys(hostkeys, hostname, options.user_hostfiles[i], 0);
usr.bin/ssh/sshconnect2.c
131
load_hostkeys(hostkeys, hostname,
usr.bin/ssh/sshconnect2.c
135
load_hostkeys_command(hostkeys, options.known_hosts_command,
usr.bin/ssh/sshconnect2.c
146
if (lookup_key_in_hostkeys_by_type(hostkeys,
usr.bin/ssh/sshconnect2.c
180
lookup_marker_in_hostkeys(hostkeys, MRK_CA)) {
usr.bin/ssh/sshconnect2.c
185
if (lookup_key_in_hostkeys_by_type(hostkeys,
usr.bin/ssh/sshconnect2.c
207
free_hostkeys(hostkeys);
usr.bin/ssh/sshd-auth.c
363
parse_hostkeys(struct sshbuf *hostkeys)
usr.bin/ssh/sshd-auth.c
371
while (sshbuf_len(hostkeys) != 0) {
usr.bin/ssh/sshd-auth.c
380
if ((r = sshbuf_get_string_direct(hostkeys, &cp, &len)) != 0)
usr.bin/ssh/sshd-auth.c
389
if ((r = sshbuf_get_string_direct(hostkeys, &cp, &len)) != 0)
usr.bin/ssh/sshd-auth.c
405
struct sshbuf *hostkeys;
usr.bin/ssh/sshd-auth.c
410
&hostkeys, NULL, NULL, NULL, NULL);
usr.bin/ssh/sshd-auth.c
411
parse_hostkeys(hostkeys);
usr.bin/ssh/sshd-auth.c
413
sshbuf_free(hostkeys);
usr.bin/ssh/sshd-session.c
253
struct sshbuf *keybuf = NULL, *hostkeys = NULL;
usr.bin/ssh/sshd-session.c
257
if ((hostkeys = sshbuf_new()) == NULL)
usr.bin/ssh/sshd-session.c
265
hostkeys)) != 0)
usr.bin/ssh/sshd-session.c
268
if ((r = sshbuf_put_string(hostkeys, NULL, 0)) != 0)
usr.bin/ssh/sshd-session.c
275
hostkeys)) != 0)
usr.bin/ssh/sshd-session.c
278
if ((r = sshbuf_put_string(hostkeys, NULL, 0)) != 0)
usr.bin/ssh/sshd-session.c
284
return hostkeys;
usr.bin/ssh/sshd-session.c
552
parse_hostkeys(struct sshbuf *hostkeys)
usr.bin/ssh/sshd-session.c
561
while (sshbuf_len(hostkeys) != 0) {
usr.bin/ssh/sshd-session.c
575
if ((r = sshbuf_froms(hostkeys, &kbuf)) != 0)
usr.bin/ssh/sshd-session.c
586
if ((r = sshbuf_get_string_direct(hostkeys, &cp, &len)) != 0)
usr.bin/ssh/sshd-session.c
595
if ((r = sshbuf_get_string_direct(hostkeys, &cp, &len)) != 0)
usr.bin/ssh/sshd-session.c
610
struct sshbuf *m, *inc, *hostkeys;
usr.bin/ssh/sshd-session.c
652
(r = sshbuf_froms(m, &hostkeys)) != 0)
usr.bin/ssh/sshd-session.c
654
parse_hostkeys(hostkeys);
usr.bin/ssh/sshd-session.c
658
sshbuf_free(hostkeys);
usr.bin/ssh/sshd.c
641
struct sshbuf *m = NULL, *keybuf = NULL, *hostkeys = NULL;
usr.bin/ssh/sshd.c
648
(hostkeys = sshbuf_new()) == NULL)
usr.bin/ssh/sshd.c
659
if ((r = sshbuf_put_stringb(hostkeys, keybuf)) != 0)
usr.bin/ssh/sshd.c
664
hostkeys)) != 0)
usr.bin/ssh/sshd.c
667
if ((r = sshbuf_put_string(hostkeys, NULL, 0)) != 0)
usr.bin/ssh/sshd.c
674
hostkeys)) != 0)
usr.bin/ssh/sshd.c
677
if ((r = sshbuf_put_string(hostkeys, NULL, 0)) != 0)
usr.bin/ssh/sshd.c
684
(r = sshbuf_put_stringb(m, hostkeys)) != 0)
usr.bin/ssh/sshd.c
691
sshbuf_free(hostkeys);