moved 8003 to separate file
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1915 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -2,39 +2,6 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
static krb5_error_code
|
|
||||||
create_8003_checksum (
|
|
||||||
const gss_channel_bindings_t input_chan_bindings,
|
|
||||||
OM_uint32 flags,
|
|
||||||
Checksum *result)
|
|
||||||
{
|
|
||||||
u_char *p;
|
|
||||||
u_int32_t val;
|
|
||||||
|
|
||||||
result->cksumtype = 0x8003;
|
|
||||||
result->checksum.length = 24;
|
|
||||||
result->checksum.data = malloc (result->checksum.length);
|
|
||||||
if (result->checksum.data == NULL)
|
|
||||||
return ENOMEM;
|
|
||||||
|
|
||||||
p = result->checksum.data;
|
|
||||||
val = 16;
|
|
||||||
*p++ = (val >> 0) & 0xFF;
|
|
||||||
*p++ = (val >> 8) & 0xFF;
|
|
||||||
*p++ = (val >> 16) & 0xFF;
|
|
||||||
*p++ = (val >> 24) & 0xFF;
|
|
||||||
memset (p, 0, 16);
|
|
||||||
p += 16;
|
|
||||||
val = flags;
|
|
||||||
*p++ = (val >> 0) & 0xFF;
|
|
||||||
*p++ = (val >> 8) & 0xFF;
|
|
||||||
*p++ = (val >> 16) & 0xFF;
|
|
||||||
*p++ = (val >> 24) & 0xFF;
|
|
||||||
if (p - (u_char *)result->checksum.data != result->checksum.length)
|
|
||||||
abort ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static OM_uint32
|
static OM_uint32
|
||||||
init_auth
|
init_auth
|
||||||
(OM_uint32 * minor_status,
|
(OM_uint32 * minor_status,
|
||||||
@@ -88,6 +55,18 @@ init_auth
|
|||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int32_t tmp;
|
||||||
|
|
||||||
|
krb5_auth_con_getflags(gssapi_krb5_context,
|
||||||
|
&(*context_handle)->auth_context,
|
||||||
|
&tmp);
|
||||||
|
tmp |= KRB5_AUTH_CONTEXT_DO_SEQUENCE;
|
||||||
|
krb5_auth_con_setflags(gssapi_krb5_context,
|
||||||
|
&(*context_handle)->auth_context,
|
||||||
|
tmp);
|
||||||
|
}
|
||||||
|
|
||||||
if (actual_mech_type)
|
if (actual_mech_type)
|
||||||
*actual_mech_type = GSS_KRB5_MECHANISM;
|
*actual_mech_type = GSS_KRB5_MECHANISM;
|
||||||
|
|
||||||
@@ -155,9 +134,9 @@ init_auth
|
|||||||
cred->session.keyvalue.data,
|
cred->session.keyvalue.data,
|
||||||
cred->session.keyvalue.length);
|
cred->session.keyvalue.length);
|
||||||
|
|
||||||
kret = create_8003_checksum (input_chan_bindings,
|
kret = gssapi_krb5_create_8003_checksum (input_chan_bindings,
|
||||||
flags,
|
flags,
|
||||||
&cksum);
|
&cksum);
|
||||||
if (kret) {
|
if (kret) {
|
||||||
ret = GSS_S_FAILURE;
|
ret = GSS_S_FAILURE;
|
||||||
goto failure;
|
goto failure;
|
||||||
|
@@ -2,39 +2,6 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
static krb5_error_code
|
|
||||||
create_8003_checksum (
|
|
||||||
const gss_channel_bindings_t input_chan_bindings,
|
|
||||||
OM_uint32 flags,
|
|
||||||
Checksum *result)
|
|
||||||
{
|
|
||||||
u_char *p;
|
|
||||||
u_int32_t val;
|
|
||||||
|
|
||||||
result->cksumtype = 0x8003;
|
|
||||||
result->checksum.length = 24;
|
|
||||||
result->checksum.data = malloc (result->checksum.length);
|
|
||||||
if (result->checksum.data == NULL)
|
|
||||||
return ENOMEM;
|
|
||||||
|
|
||||||
p = result->checksum.data;
|
|
||||||
val = 16;
|
|
||||||
*p++ = (val >> 0) & 0xFF;
|
|
||||||
*p++ = (val >> 8) & 0xFF;
|
|
||||||
*p++ = (val >> 16) & 0xFF;
|
|
||||||
*p++ = (val >> 24) & 0xFF;
|
|
||||||
memset (p, 0, 16);
|
|
||||||
p += 16;
|
|
||||||
val = flags;
|
|
||||||
*p++ = (val >> 0) & 0xFF;
|
|
||||||
*p++ = (val >> 8) & 0xFF;
|
|
||||||
*p++ = (val >> 16) & 0xFF;
|
|
||||||
*p++ = (val >> 24) & 0xFF;
|
|
||||||
if (p - (u_char *)result->checksum.data != result->checksum.length)
|
|
||||||
abort ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static OM_uint32
|
static OM_uint32
|
||||||
init_auth
|
init_auth
|
||||||
(OM_uint32 * minor_status,
|
(OM_uint32 * minor_status,
|
||||||
@@ -88,6 +55,18 @@ init_auth
|
|||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int32_t tmp;
|
||||||
|
|
||||||
|
krb5_auth_con_getflags(gssapi_krb5_context,
|
||||||
|
&(*context_handle)->auth_context,
|
||||||
|
&tmp);
|
||||||
|
tmp |= KRB5_AUTH_CONTEXT_DO_SEQUENCE;
|
||||||
|
krb5_auth_con_setflags(gssapi_krb5_context,
|
||||||
|
&(*context_handle)->auth_context,
|
||||||
|
tmp);
|
||||||
|
}
|
||||||
|
|
||||||
if (actual_mech_type)
|
if (actual_mech_type)
|
||||||
*actual_mech_type = GSS_KRB5_MECHANISM;
|
*actual_mech_type = GSS_KRB5_MECHANISM;
|
||||||
|
|
||||||
@@ -155,9 +134,9 @@ init_auth
|
|||||||
cred->session.keyvalue.data,
|
cred->session.keyvalue.data,
|
||||||
cred->session.keyvalue.length);
|
cred->session.keyvalue.length);
|
||||||
|
|
||||||
kret = create_8003_checksum (input_chan_bindings,
|
kret = gssapi_krb5_create_8003_checksum (input_chan_bindings,
|
||||||
flags,
|
flags,
|
||||||
&cksum);
|
&cksum);
|
||||||
if (kret) {
|
if (kret) {
|
||||||
ret = GSS_S_FAILURE;
|
ret = GSS_S_FAILURE;
|
||||||
goto failure;
|
goto failure;
|
||||||
|
Reference in New Issue
Block a user