diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index e2d64d7b1..1f57c3a9f 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.75 2001/06/23 02:34:33 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.76 2001/06/23 15:12:21 itojun Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/md5.h> | 29 | #include <openssl/md5.h> |
@@ -72,7 +72,7 @@ struct sockaddr *xxx_hostaddr; | |||
72 | 72 | ||
73 | Kex *xxx_kex = NULL; | 73 | Kex *xxx_kex = NULL; |
74 | 74 | ||
75 | int | 75 | static int |
76 | verify_host_key_callback(Key *hostkey) | 76 | verify_host_key_callback(Key *hostkey) |
77 | { | 77 | { |
78 | if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1) | 78 | if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1) |
@@ -188,14 +188,12 @@ int userauth_hostbased(Authctxt *authctxt); | |||
188 | 188 | ||
189 | void userauth(Authctxt *authctxt, char *authlist); | 189 | void userauth(Authctxt *authctxt, char *authlist); |
190 | 190 | ||
191 | int | 191 | static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *); |
192 | sign_and_send_pubkey(Authctxt *authctxt, Key *k, | 192 | static void clear_auth_state(Authctxt *); |
193 | sign_cb_fn *sign_callback); | ||
194 | void clear_auth_state(Authctxt *authctxt); | ||
195 | 193 | ||
196 | Authmethod *authmethod_get(char *authlist); | 194 | static Authmethod *authmethod_get(char *authlist); |
197 | Authmethod *authmethod_lookup(const char *name); | 195 | static Authmethod *authmethod_lookup(const char *name); |
198 | char *authmethods_get(void); | 196 | static char *authmethods_get(void); |
199 | 197 | ||
200 | Authmethod authmethods[] = { | 198 | Authmethod authmethods[] = { |
201 | {"publickey", | 199 | {"publickey", |
@@ -477,7 +475,7 @@ clear_auth_state(Authctxt *authctxt) | |||
477 | authctxt->last_key_sign = NULL; | 475 | authctxt->last_key_sign = NULL; |
478 | } | 476 | } |
479 | 477 | ||
480 | int | 478 | static int |
481 | sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | 479 | sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) |
482 | { | 480 | { |
483 | Buffer b; | 481 | Buffer b; |
@@ -562,7 +560,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | |||
562 | return 1; | 560 | return 1; |
563 | } | 561 | } |
564 | 562 | ||
565 | int | 563 | static int |
566 | send_pubkey_test(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback, | 564 | send_pubkey_test(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback, |
567 | int hint) | 565 | int hint) |
568 | { | 566 | { |
@@ -595,7 +593,7 @@ send_pubkey_test(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback, | |||
595 | return 1; | 593 | return 1; |
596 | } | 594 | } |
597 | 595 | ||
598 | Key * | 596 | static Key * |
599 | load_identity_file(char *filename) | 597 | load_identity_file(char *filename) |
600 | { | 598 | { |
601 | Key *private; | 599 | Key *private; |
@@ -633,7 +631,7 @@ load_identity_file(char *filename) | |||
633 | return private; | 631 | return private; |
634 | } | 632 | } |
635 | 633 | ||
636 | int | 634 | static int |
637 | identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | 635 | identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, |
638 | u_char *data, int datalen) | 636 | u_char *data, int datalen) |
639 | { | 637 | { |
@@ -651,19 +649,21 @@ identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | |||
651 | return ret; | 649 | return ret; |
652 | } | 650 | } |
653 | 651 | ||
654 | int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | 652 | static int |
653 | agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | ||
655 | u_char *data, int datalen) | 654 | u_char *data, int datalen) |
656 | { | 655 | { |
657 | return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen); | 656 | return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen); |
658 | } | 657 | } |
659 | 658 | ||
660 | int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | 659 | static int |
660 | key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | ||
661 | u_char *data, int datalen) | 661 | u_char *data, int datalen) |
662 | { | 662 | { |
663 | return key_sign(key, sigp, lenp, data, datalen); | 663 | return key_sign(key, sigp, lenp, data, datalen); |
664 | } | 664 | } |
665 | 665 | ||
666 | int | 666 | static int |
667 | userauth_pubkey_agent(Authctxt *authctxt) | 667 | userauth_pubkey_agent(Authctxt *authctxt) |
668 | { | 668 | { |
669 | static int called = 0; | 669 | static int called = 0; |
@@ -900,7 +900,7 @@ userauth_hostbased(Authctxt *authctxt) | |||
900 | * given auth method name, if configurable options permit this method fill | 900 | * given auth method name, if configurable options permit this method fill |
901 | * in auth_ident field and return true, otherwise return false. | 901 | * in auth_ident field and return true, otherwise return false. |
902 | */ | 902 | */ |
903 | int | 903 | static int |
904 | authmethod_is_enabled(Authmethod *method) | 904 | authmethod_is_enabled(Authmethod *method) |
905 | { | 905 | { |
906 | if (method == NULL) | 906 | if (method == NULL) |
@@ -914,7 +914,7 @@ authmethod_is_enabled(Authmethod *method) | |||
914 | return 1; | 914 | return 1; |
915 | } | 915 | } |
916 | 916 | ||
917 | Authmethod * | 917 | static Authmethod * |
918 | authmethod_lookup(const char *name) | 918 | authmethod_lookup(const char *name) |
919 | { | 919 | { |
920 | Authmethod *method = NULL; | 920 | Authmethod *method = NULL; |
@@ -935,7 +935,7 @@ static char *preferred = NULL; | |||
935 | * next method we should try. If the server initially sends a nil list, | 935 | * next method we should try. If the server initially sends a nil list, |
936 | * use a built-in default list. | 936 | * use a built-in default list. |
937 | */ | 937 | */ |
938 | Authmethod * | 938 | static Authmethod * |
939 | authmethod_get(char *authlist) | 939 | authmethod_get(char *authlist) |
940 | { | 940 | { |
941 | 941 | ||