From: Jeremy Allison Date: Thu, 14 Feb 2008 19:29:54 +0000 (-0800) Subject: Allow the mechOID to be written separately. X-Git-Tag: samba-3.2.0pre2~37^2~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3e08c6e7d270e1be7a9d3042b1f36f5a291f90a;p=thirdparty%2Fsamba.git Allow the mechOID to be written separately. Jeremy. --- diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c index f95b11e4cde..a75032a47d6 100644 --- a/source/libsmb/clispnego.c +++ b/source/libsmb/clispnego.c @@ -498,11 +498,13 @@ DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status, asn1_write_enumerated(&data, negResult); asn1_pop_tag(&data); - if (reply->data != NULL) { + if (mechOID) { asn1_push_tag(&data,ASN1_CONTEXT(1)); asn1_write_OID(&data, mechOID); asn1_pop_tag(&data); - + } + + if (reply && reply->data != NULL) { asn1_push_tag(&data,ASN1_CONTEXT(2)); asn1_write_OctetString(&data, reply->data, reply->length); asn1_pop_tag(&data);