version 1.1, 2003/08/22 10:56:09 |
version 1.1.2.1, 2004/02/28 03:51:33 |
|
|
#include "compat.h" |
#include "compat.h" |
#include "log.h" |
#include "log.h" |
#include "monitor_wrap.h" |
#include "monitor_wrap.h" |
|
#include "ssh2.h" |
|
|
#include "ssh-gss.h" |
#include "ssh-gss.h" |
|
|
|
extern u_char *session_id2; |
|
extern u_int session_id2_len; |
|
|
/* Check that the OID in a data stream matches that in the context */ |
/* Check that the OID in a data stream matches that in the context */ |
int |
int |
|
|
|
|
gss_release_oid_set(&status, &oidset); |
gss_release_oid_set(&status, &oidset); |
return (ctx->major); |
return (ctx->major); |
|
} |
|
|
|
OM_uint32 |
|
ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) |
|
{ |
|
if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context, |
|
GSS_C_QOP_DEFAULT, buffer, hash))) |
|
ssh_gssapi_error(ctx); |
|
|
|
return (ctx->major); |
|
} |
|
|
|
void |
|
ssh_gssapi_buildmic(Buffer *b, const char *user, const char *service, |
|
const char *context) |
|
{ |
|
buffer_init(b); |
|
buffer_put_string(b, session_id2, session_id2_len); |
|
buffer_put_char(b, SSH2_MSG_USERAUTH_REQUEST); |
|
buffer_put_cstring(b, user); |
|
buffer_put_cstring(b, service); |
|
buffer_put_cstring(b, context); |
} |
} |
|
|
OM_uint32 |
OM_uint32 |