version 1.126, 2013/06/21 00:34:49 |
version 1.127, 2013/07/19 07:37:48 |
|
|
#include "ssh2.h" |
#include "ssh2.h" |
#include "jpake.h" |
#include "jpake.h" |
#include "roaming.h" |
#include "roaming.h" |
|
#include "authfd.h" |
|
|
#ifdef GSSAPI |
#ifdef GSSAPI |
static Gssctxt *gsscontext = NULL; |
static Gssctxt *gsscontext = NULL; |
|
|
return (0); |
return (0); |
} |
} |
|
|
|
extern AuthenticationConnection *auth_conn; |
|
|
int |
int |
mm_answer_sign(int sock, Buffer *m) |
mm_answer_sign(int sock, Buffer *m) |
{ |
{ |
|
|
memcpy(session_id2, p, session_id2_len); |
memcpy(session_id2, p, session_id2_len); |
} |
} |
|
|
if ((key = get_hostkey_by_index(keyid)) == NULL) |
if ((key = get_hostkey_by_index(keyid)) != NULL) { |
|
if (key_sign(key, &signature, &siglen, p, datlen) < 0) |
|
fatal("%s: key_sign failed", __func__); |
|
} else if ((key = get_hostkey_public_by_index(keyid)) != NULL && |
|
auth_conn != NULL) { |
|
if (ssh_agent_sign(auth_conn, key, &signature, &siglen, p, |
|
datlen) < 0) |
|
fatal("%s: ssh_agent_sign failed", __func__); |
|
} else |
fatal("%s: no hostkey from index %d", __func__, keyid); |
fatal("%s: no hostkey from index %d", __func__, keyid); |
if (key_sign(key, &signature, &siglen, p, datlen) < 0) |
|
fatal("%s: key_sign failed", __func__); |
|
|
|
debug3("%s: signature %p(%u)", __func__, signature, siglen); |
debug3("%s: signature %p(%u)", __func__, signature, siglen); |
|
|
|
|
kex->load_host_public_key=&get_hostkey_public_by_type; |
kex->load_host_public_key=&get_hostkey_public_by_type; |
kex->load_host_private_key=&get_hostkey_private_by_type; |
kex->load_host_private_key=&get_hostkey_private_by_type; |
kex->host_key_index=&get_hostkey_index; |
kex->host_key_index=&get_hostkey_index; |
|
kex->sign = sshd_hostkey_sign; |
|
|
return (kex); |
return (kex); |
} |
} |