Add detection of NTLMSSP.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19361 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -91,6 +91,8 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid)
|
||||
|
||||
static gss_OID_desc krb5_mechanism =
|
||||
{9, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02")};
|
||||
static gss_OID_desc ntlm_mechanism =
|
||||
{10, rk_UNCONST("\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a")},
|
||||
static gss_OID_desc spnego_mechanism =
|
||||
{6, rk_UNCONST("\x2b\x06\x01\x05\x05\x02")};
|
||||
|
||||
@@ -112,7 +114,14 @@ choose_mech(const gss_buffer_t input, gss_OID mech_oid)
|
||||
* Lets guess what mech is really is, callback function to mech ??
|
||||
*/
|
||||
|
||||
if (input->length != 0 && ((const char *)input->value)[0] == 0x6E) {
|
||||
if (input->length > 8 &&
|
||||
memcmp((const char *)input->value, "NTLMSSP\x00", 8) == 0)
|
||||
{
|
||||
*mech_oid = ntlm_mechanism;
|
||||
return GSS_S_COMPLETE;
|
||||
} else if (input->length != 0 &&
|
||||
((const char *)input->value)[0] == 0x6E)
|
||||
{
|
||||
/* Could be a raw AP-REQ (check for APPLICATION tag) */
|
||||
*mech_oid = krb5_mechanism;
|
||||
return GSS_S_COMPLETE;
|
||||
|
Reference in New Issue
Block a user