diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-08-04 13:10:43 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-08-04 13:10:43 +0000 |
commit | a4954bd3d28bc9ffcd33d4ceef71ba1a31723eb6 (patch) | |
tree | b3ae1e579de2dc263c098ec0a10d09fc58bd497f /source3/libsmb/spnego.c | |
parent | 05540b48f0dc6209bb67db62ba6d7a1f9c33b4de (diff) | |
download | samba-a4954bd3d28bc9ffcd33d4ceef71ba1a31723eb6.tar.gz samba-a4954bd3d28bc9ffcd33d4ceef71ba1a31723eb6.tar.xz samba-a4954bd3d28bc9ffcd33d4ceef71ba1a31723eb6.zip |
Changes to make gss-spnego ntlmssp client work against W2k AD.
Now I know where the mechListMIC changes came from: Ethereal ;-)
Volker
(This used to be commit 4e9eed1273035d09ac3b427b9711327ba8c6ebfc)
Diffstat (limited to 'source3/libsmb/spnego.c')
-rw-r--r-- | source3/libsmb/spnego.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c index 8cf2413a215..0b2dec7ef84 100644 --- a/source3/libsmb/spnego.c +++ b/source3/libsmb/spnego.c @@ -71,7 +71,23 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token) /* Read mecListMIC */ case ASN1_CONTEXT(3): asn1_start_tag(asn1, ASN1_CONTEXT(3)); - asn1_read_OctetString(asn1, &token->mechListMIC); + if (asn1->data[asn1->ofs] == ASN1_OCTET_STRING) { + asn1_read_OctetString(asn1, + &token->mechListMIC); + } else { + /* RFC 2478 says we have an Octet String here, + but W2k sends something different... */ + char *mechListMIC; + asn1_push_tag(asn1, ASN1_SEQUENCE(0)); + asn1_push_tag(asn1, ASN1_CONTEXT(0)); + asn1_read_GeneralString(asn1, &mechListMIC); + asn1_pop_tag(asn1); + asn1_pop_tag(asn1); + + token->mechListMIC = + data_blob(mechListMIC, strlen(mechListMIC)); + SAFE_FREE(mechListMIC); + } asn1_end_tag(asn1); break; default: |