summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-25 05:01:22 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-25 05:01:22 +0000
commitbba81213b972ce15fbbaca60b9ffabb42371ce8f (patch)
treee6bd40752969f2b93d179cfb9aaae9074ca45956 /sshconnect2.c
parent34f91883a6f3123656b0a8017d68b658f7cf2403 (diff)
- itojun@cvs.openbsd.org 2001/06/23 15:12:20
[auth1.c auth2.c auth2-chall.c authfd.c authfile.c auth-rhosts.c canohost.c channels.c cipher.c clientloop.c deattack.c dh.c hostfile.c kex.c kexdh.c kexgex.c key.c nchan.c packet.c radix.c readpass.c scp.c servconf.c serverloop.c session.c sftp.c sftp-client.c sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c sshconnect1.c sshconnect2.c sshconnect.c sshd.c ssh-keygen.c ssh-keyscan.c] more strict prototypes. raise warning level in Makefile.inc. markus ok'ed TODO; cleanup headers
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c38
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"
26RCSID("$OpenBSD: sshconnect2.c,v 1.75 2001/06/23 02:34:33 markus Exp $"); 26RCSID("$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
73Kex *xxx_kex = NULL; 73Kex *xxx_kex = NULL;
74 74
75int 75static int
76verify_host_key_callback(Key *hostkey) 76verify_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
189void userauth(Authctxt *authctxt, char *authlist); 189void userauth(Authctxt *authctxt, char *authlist);
190 190
191int 191static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *);
192sign_and_send_pubkey(Authctxt *authctxt, Key *k, 192static void clear_auth_state(Authctxt *);
193 sign_cb_fn *sign_callback);
194void clear_auth_state(Authctxt *authctxt);
195 193
196Authmethod *authmethod_get(char *authlist); 194static Authmethod *authmethod_get(char *authlist);
197Authmethod *authmethod_lookup(const char *name); 195static Authmethod *authmethod_lookup(const char *name);
198char *authmethods_get(void); 196static char *authmethods_get(void);
199 197
200Authmethod authmethods[] = { 198Authmethod 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
480int 478static int
481sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) 479sign_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
565int 563static int
566send_pubkey_test(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback, 564send_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
598Key * 596static Key *
599load_identity_file(char *filename) 597load_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
636int 634static int
637identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, 635identity_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
654int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, 652static int
653agent_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
660int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, 659static int
660key_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
666int 666static int
667userauth_pubkey_agent(Authctxt *authctxt) 667userauth_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 */
903int 903static int
904authmethod_is_enabled(Authmethod *method) 904authmethod_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
917Authmethod * 917static Authmethod *
918authmethod_lookup(const char *name) 918authmethod_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 */
938Authmethod * 938static Authmethod *
939authmethod_get(char *authlist) 939authmethod_get(char *authlist)
940{ 940{
941 941