diff options
author | markus@openbsd.org <markus@openbsd.org> | 2017-05-30 08:52:19 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-05-31 10:47:31 +1000 |
commit | 54d90ace1d3535b44d92a8611952dc109a74a031 (patch) | |
tree | 1b5ff69321b88b32fba058fe2c966bf177c95b28 /sshconnect.c | |
parent | c221219b1fbee47028dcaf66613f4f8d6b7640e9 (diff) |
upstream commit
switch from Key typedef with struct sshkey; ok djm@
Upstream-ID: 3067d33e04efbe5131ce8f70668c47a58e5b7a1f
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sshconnect.c b/sshconnect.c index 0af5f55bc..af7307eb5 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.c,v 1.278 2017/05/01 02:27:11 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect.c,v 1.279 2017/05/30 08:52:19 markus 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 |
@@ -67,7 +67,7 @@ | |||
67 | 67 | ||
68 | char *client_version_string = NULL; | 68 | char *client_version_string = NULL; |
69 | char *server_version_string = NULL; | 69 | char *server_version_string = NULL; |
70 | Key *previous_host_key = NULL; | 70 | struct sshkey *previous_host_key = NULL; |
71 | 71 | ||
72 | static int matching_host_key_dns = 0; | 72 | static int matching_host_key_dns = 0; |
73 | 73 | ||
@@ -79,8 +79,8 @@ extern char *__progname; | |||
79 | extern uid_t original_real_uid; | 79 | extern uid_t original_real_uid; |
80 | extern uid_t original_effective_uid; | 80 | extern uid_t original_effective_uid; |
81 | 81 | ||
82 | static int show_other_keys(struct hostkeys *, Key *); | 82 | static int show_other_keys(struct hostkeys *, struct sshkey *); |
83 | static void warn_changed_key(Key *); | 83 | static void warn_changed_key(struct sshkey *); |
84 | 84 | ||
85 | /* Expand a proxy command */ | 85 | /* Expand a proxy command */ |
86 | static char * | 86 | static char * |
@@ -667,7 +667,7 @@ confirm(const char *prompt) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | static int | 669 | static int |
670 | check_host_cert(const char *host, const Key *host_key) | 670 | check_host_cert(const char *host, const struct sshkey *host_key) |
671 | { | 671 | { |
672 | const char *reason; | 672 | const char *reason; |
673 | 673 | ||
@@ -765,13 +765,13 @@ get_hostfile_hostname_ipaddr(char *hostname, struct sockaddr *hostaddr, | |||
765 | #define ROQUIET 2 | 765 | #define ROQUIET 2 |
766 | static int | 766 | static int |
767 | check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | 767 | check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, |
768 | Key *host_key, int readonly, | 768 | struct sshkey *host_key, int readonly, |
769 | char **user_hostfiles, u_int num_user_hostfiles, | 769 | char **user_hostfiles, u_int num_user_hostfiles, |
770 | char **system_hostfiles, u_int num_system_hostfiles) | 770 | char **system_hostfiles, u_int num_system_hostfiles) |
771 | { | 771 | { |
772 | HostStatus host_status; | 772 | HostStatus host_status; |
773 | HostStatus ip_status; | 773 | HostStatus ip_status; |
774 | Key *raw_key = NULL; | 774 | struct sshkey *raw_key = NULL; |
775 | char *ip = NULL, *host = NULL; | 775 | char *ip = NULL, *host = NULL; |
776 | char hostline[1000], *hostp, *fp, *ra; | 776 | char hostline[1000], *hostp, *fp, *ra; |
777 | char msg[1024]; | 777 | char msg[1024]; |
@@ -1196,7 +1196,7 @@ fail: | |||
1196 | 1196 | ||
1197 | /* returns 0 if key verifies or -1 if key does NOT verify */ | 1197 | /* returns 0 if key verifies or -1 if key does NOT verify */ |
1198 | int | 1198 | int |
1199 | verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key) | 1199 | verify_host_key(char *host, struct sockaddr *hostaddr, struct sshkey *host_key) |
1200 | { | 1200 | { |
1201 | u_int i; | 1201 | u_int i; |
1202 | int r = -1, flags = 0; | 1202 | int r = -1, flags = 0; |
@@ -1362,7 +1362,7 @@ ssh_put_password(char *password) | |||
1362 | 1362 | ||
1363 | /* print all known host keys for a given host, but skip keys of given type */ | 1363 | /* print all known host keys for a given host, but skip keys of given type */ |
1364 | static int | 1364 | static int |
1365 | show_other_keys(struct hostkeys *hostkeys, Key *key) | 1365 | show_other_keys(struct hostkeys *hostkeys, struct sshkey *key) |
1366 | { | 1366 | { |
1367 | int type[] = { | 1367 | int type[] = { |
1368 | KEY_RSA, | 1368 | KEY_RSA, |
@@ -1402,7 +1402,7 @@ show_other_keys(struct hostkeys *hostkeys, Key *key) | |||
1402 | } | 1402 | } |
1403 | 1403 | ||
1404 | static void | 1404 | static void |
1405 | warn_changed_key(Key *host_key) | 1405 | warn_changed_key(struct sshkey *host_key) |
1406 | { | 1406 | { |
1407 | char *fp; | 1407 | char *fp; |
1408 | 1408 | ||
@@ -1465,7 +1465,7 @@ ssh_local_cmd(const char *args) | |||
1465 | } | 1465 | } |
1466 | 1466 | ||
1467 | void | 1467 | void |
1468 | maybe_add_key_to_agent(char *authfile, Key *private, char *comment, | 1468 | maybe_add_key_to_agent(char *authfile, struct sshkey *private, char *comment, |
1469 | char *passphrase) | 1469 | char *passphrase) |
1470 | { | 1470 | { |
1471 | int auth_sock = -1, r; | 1471 | int auth_sock = -1, r; |