Changeset 587 for vendor/current/source3/libsmb/clispnego.c
- Timestamp:
- Jun 29, 2011, 7:36:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/libsmb/clispnego.c
r414 r587 5 5 Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002 6 6 Copyright (C) Luke Howard 2003 7 7 8 8 This program is free software; you can redistribute it and/or modify 9 9 it under the terms of the GNU General Public License as published by … … 147 147 148 148 asn1_check_OID(data,OID_SPNEGO); 149 150 /* negTokenInit [0] NegTokenInit */ 149 151 asn1_start_tag(data,ASN1_CONTEXT(0)); 150 152 asn1_start_tag(data,ASN1_SEQUENCE(0)); 153 154 /* mechTypes [0] MechTypeList OPTIONAL */ 155 156 /* Not really optional, we depend on this to decide 157 * what mechanisms we have to work with. */ 151 158 152 159 asn1_start_tag(data,ASN1_CONTEXT(0)); … … 162 169 163 170 *principal = NULL; 164 if (asn1_tag_remaining(data) > 0) { 171 172 /* 173 Win7 + Live Sign-in Assistant attaches a mechToken 174 ASN1_CONTEXT(2) to the negTokenInit packet 175 which breaks our negotiation if we just assume 176 the next tag is ASN1_CONTEXT(3). 177 */ 178 179 if (asn1_peek_tag(data, ASN1_CONTEXT(1))) { 180 uint8 flags; 181 182 /* reqFlags [1] ContextFlags OPTIONAL */ 183 asn1_start_tag(data, ASN1_CONTEXT(1)); 184 asn1_start_tag(data, ASN1_BIT_STRING); 185 while (asn1_tag_remaining(data) > 0) { 186 asn1_read_uint8(data, &flags); 187 } 188 asn1_end_tag(data); 189 asn1_end_tag(data); 190 } 191 192 if (asn1_peek_tag(data, ASN1_CONTEXT(2))) { 193 /* mechToken [2] OCTET STRING OPTIONAL */ 194 DATA_BLOB token; 195 asn1_start_tag(data, ASN1_CONTEXT(2)); 196 asn1_read_OctetString(data, talloc_autofree_context(), 197 &token); 198 asn1_end_tag(data); 199 /* Throw away the token - not used. */ 200 data_blob_free(&token); 201 } 202 203 if (asn1_peek_tag(data, ASN1_CONTEXT(3))) { 204 /* mechListMIC [3] OCTET STRING OPTIONAL */ 165 205 asn1_start_tag(data, ASN1_CONTEXT(3)); 166 206 asn1_start_tag(data, ASN1_SEQUENCE(0)); 167 207 asn1_start_tag(data, ASN1_CONTEXT(0)); 168 asn1_read_GeneralString(data,talloc_autofree_context(),principal); 208 asn1_read_GeneralString(data,talloc_autofree_context(), 209 principal); 169 210 asn1_end_tag(data); 170 211 asn1_end_tag(data);
Note:
See TracChangeset
for help on using the changeset viewer.