summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clispnego.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-14 11:29:54 -0800
committerJeremy Allison <jra@samba.org>2008-02-14 11:29:54 -0800
commit39e0dbcf07251670b5475e9d0533c08a2712fffa (patch)
tree231afe3b862179151b9d905131fdda4a1710d91f /source3/libsmb/clispnego.c
parent31e5116a88b57d20ba8017e779345f8e2108c8d7 (diff)
downloadsamba-39e0dbcf07251670b5475e9d0533c08a2712fffa.tar.gz
samba-39e0dbcf07251670b5475e9d0533c08a2712fffa.tar.xz
samba-39e0dbcf07251670b5475e9d0533c08a2712fffa.zip
Allow the mechOID to be written separately.
Jeremy. (This used to be commit e3e08c6e7d270e1be7a9d3042b1f36f5a291f90a)
Diffstat (limited to 'source3/libsmb/clispnego.c')
-rw-r--r--source3/libsmb/clispnego.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index f95b11e4cde..a75032a47d6 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/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);