summaryrefslogtreecommitdiff
path: root/libcli/smb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-04-16 10:25:12 +0200
committerStefan Metzmacher <metze@samba.org>2012-04-16 12:21:17 +0200
commitb23f5a9418e8acca035930e031c4624478a3d8a9 (patch)
tree03bd4645d8fd7ff458228a88cfebe369a632ae1e /libcli/smb
parent1e7f8d5ad0678566f14ce1c0b67e131183decf08 (diff)
downloadsamba-b23f5a9418e8acca035930e031c4624478a3d8a9.tar.gz
samba-b23f5a9418e8acca035930e031c4624478a3d8a9.tar.bz2
samba-b23f5a9418e8acca035930e031c4624478a3d8a9.zip
libcli/smb: make use of data_blob_string_const_null()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Apr 16 12:21:17 CEST 2012 on sn-devel-104
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smbXcli_base.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index b54d7e45ea..67ab3d0565 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -4145,10 +4145,8 @@ NTSTATUS smb2cli_session_set_session_key(struct smbXcli_session *session,
}
if (conn->protocol >= PROTOCOL_SMB2_24) {
-#define _STRING_BLOB(x) data_blob_const((const uint8_t *)(x), sizeof(x))
- const DATA_BLOB label = _STRING_BLOB("SMB2AESCMAC");
- const DATA_BLOB context = _STRING_BLOB("SmbSign");
-#undef _STRING_BLOB
+ const DATA_BLOB label = data_blob_string_const_null("SMB2AESCMAC");
+ const DATA_BLOB context = data_blob_string_const_null("SmbSign");
smb2_key_derivation(session_key, sizeof(session_key),
label.data, label.length,
@@ -4164,10 +4162,8 @@ NTSTATUS smb2cli_session_set_session_key(struct smbXcli_session *session,
}
if (conn->protocol >= PROTOCOL_SMB2_24) {
-#define _STRING_BLOB(x) data_blob_const((const uint8_t *)(x), sizeof(x))
- const DATA_BLOB label = _STRING_BLOB("SMB2APP");
- const DATA_BLOB context = _STRING_BLOB("SmbRpc");
-#undef _STRING_BLOB
+ const DATA_BLOB label = data_blob_string_const_null("SMB2APP");
+ const DATA_BLOB context = data_blob_string_const_null("SmbRpc");
smb2_key_derivation(session_key, sizeof(session_key),
label.data, label.length,
@@ -4269,10 +4265,8 @@ NTSTATUS smb2cli_session_set_channel_key(struct smbXcli_session *session,
}
if (conn->protocol >= PROTOCOL_SMB2_24) {
-#define _STRING_BLOB(x) data_blob_const((const uint8_t *)(x), sizeof(x))
- const DATA_BLOB label = _STRING_BLOB("SMB2AESCMAC");
- const DATA_BLOB context = _STRING_BLOB("SmbSign");
-#undef _STRING_BLOB
+ const DATA_BLOB label = data_blob_string_const_null("SMB2AESCMAC");
+ const DATA_BLOB context = data_blob_string_const_null("SmbSign");
smb2_key_derivation(channel_key, sizeof(channel_key),
label.data, label.length,