summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/smb_signing.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-07-05 23:28:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:51 -0500
commit4f0e5e069064c11a8efc407cd42412d38534d0d2 (patch)
treefcf4d3913183525653af213c6c15abbb8b9c6754 /source4/libcli/raw/smb_signing.c
parent8bebc53df8ff46e801ed1258206126f6ebe9a1c3 (diff)
downloadsamba-4f0e5e069064c11a8efc407cd42412d38534d0d2.tar.gz
samba-4f0e5e069064c11a8efc407cd42412d38534d0d2.tar.bz2
samba-4f0e5e069064c11a8efc407cd42412d38534d0d2.zip
r1345: add extended security spnego support to the smb client
code set lp_use_spnego = False, because I can't get it working yet but I commit it so others can help me metze (This used to be commit 2445cceba9ab9bd928c8bc50927a39509e4526b0)
Diffstat (limited to 'source4/libcli/raw/smb_signing.c')
-rw-r--r--source4/libcli/raw/smb_signing.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index a39f33c290..20b44a5348 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -299,6 +299,56 @@ BOOL cli_null_set_signing(struct cli_transport *transport)
return True;
}
+/***********************************************************
+ SMB signing - TEMP implementation - calculate a MAC to send.
+************************************************************/
+static void cli_request_temp_sign_outgoing_message(struct cli_request *req)
+{
+ /* mark the packet as signed - BEFORE we sign it...*/
+ mark_packet_signed(req);
+
+ /* I wonder what BSRSPYL stands for - but this is what MS
+ actually sends! */
+ memcpy((req->out.hdr + HDR_SS_FIELD), "BSRSPYL ", 8);
+ return;
+}
+
+/***********************************************************
+ SMB signing - TEMP implementation - check a MAC sent by server.
+************************************************************/
+static BOOL cli_request_temp_check_incoming_message(struct cli_request *req)
+{
+ return True;
+}
+
+/***********************************************************
+ SMB signing - NULL implementation - free signing context
+************************************************************/
+static void cli_temp_free_signing_context(struct cli_transport *transport)
+{
+ return;
+}
+
+/**
+ SMB signing - TEMP implementation - setup the MAC key.
+
+ @note Used as an initialisation only - it will not correctly
+ shut down a real signing mechanism
+*/
+BOOL cli_temp_set_signing(struct cli_transport *transport)
+{
+ if (!set_smb_signing_common(transport)) {
+ return False;
+ }
+
+ transport->negotiate.sign_info.signing_context = NULL;
+
+ transport->negotiate.sign_info.sign_outgoing_message = cli_request_temp_sign_outgoing_message;
+ transport->negotiate.sign_info.check_incoming_message = cli_request_temp_check_incoming_message;
+ transport->negotiate.sign_info.free_signing_context = cli_temp_free_signing_context;
+
+ return True;
+}
/**
* Free the signing context