version 1.258, 2017/05/05 10:42:49 |
version 1.259, 2017/05/30 08:52:20 |
|
|
struct sockaddr *xxx_hostaddr; |
struct sockaddr *xxx_hostaddr; |
|
|
static int |
static int |
verify_host_key_callback(Key *hostkey, struct ssh *ssh) |
verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh) |
{ |
{ |
if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1) |
if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1) |
fatal("Host key verification failed."); |
fatal("Host key verification failed."); |
|
|
static void pubkey_prepare(Authctxt *); |
static void pubkey_prepare(Authctxt *); |
static void pubkey_cleanup(Authctxt *); |
static void pubkey_cleanup(Authctxt *); |
static void pubkey_reset(Authctxt *); |
static void pubkey_reset(Authctxt *); |
static Key *load_identity_file(Identity *); |
static struct sshkey *load_identity_file(Identity *); |
|
|
static Authmethod *authmethod_get(char *authlist); |
static Authmethod *authmethod_get(char *authlist); |
static Authmethod *authmethod_lookup(const char *name); |
static Authmethod *authmethod_lookup(const char *name); |
|
|
input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) |
input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
Authctxt *authctxt = ctxt; |
Authctxt *authctxt = ctxt; |
Key *key = NULL; |
struct sshkey *key = NULL; |
Identity *id = NULL; |
Identity *id = NULL; |
Buffer b; |
Buffer b; |
int pktype, sent = 0; |
int pktype, sent = 0; |
|
|
identity_sign(struct identity *id, u_char **sigp, size_t *lenp, |
identity_sign(struct identity *id, u_char **sigp, size_t *lenp, |
const u_char *data, size_t datalen, u_int compat) |
const u_char *data, size_t datalen, u_int compat) |
{ |
{ |
Key *prv; |
struct sshkey *prv; |
int ret; |
int ret; |
|
|
/* the agent supports this key */ |
/* the agent supports this key */ |
|
|
return 1; |
return 1; |
} |
} |
|
|
static Key * |
static struct sshkey * |
load_identity_file(Identity *id) |
load_identity_file(Identity *id) |
{ |
{ |
Key *private = NULL; |
struct sshkey *private = NULL; |
char prompt[300], *passphrase, *comment; |
char prompt[300], *passphrase, *comment; |
int r, perm_ok = 0, quit = 0, i; |
int r, perm_ok = 0, quit = 0, i; |
struct stat st; |
struct stat st; |