diff options
Diffstat (limited to 'hostfile.c')
-rw-r--r-- | hostfile.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/hostfile.c b/hostfile.c index a4a355972..a91dbbd94 100644 --- a/hostfile.c +++ b/hostfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hostfile.c,v 1.79 2020/03/06 18:25:12 markus Exp $ */ | 1 | /* $OpenBSD: hostfile.c,v 1.80 2020/05/13 09:52:41 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -406,6 +406,18 @@ lookup_key_in_hostkeys_by_type(struct hostkeys *hostkeys, int keytype, | |||
406 | found) == HOST_FOUND); | 406 | found) == HOST_FOUND); |
407 | } | 407 | } |
408 | 408 | ||
409 | int | ||
410 | lookup_marker_in_hostkeys(struct hostkeys *hostkeys, int want_marker) | ||
411 | { | ||
412 | u_int i; | ||
413 | |||
414 | for (i = 0; i < hostkeys->num_entries; i++) { | ||
415 | if (hostkeys->entries[i].marker == (HostkeyMarker)want_marker) | ||
416 | return 1; | ||
417 | } | ||
418 | return 0; | ||
419 | } | ||
420 | |||
409 | static int | 421 | static int |
410 | write_host_entry(FILE *f, const char *host, const char *ip, | 422 | write_host_entry(FILE *f, const char *host, const char *ip, |
411 | const struct sshkey *key, int store_hash) | 423 | const struct sshkey *key, int store_hash) |