From 3e021c3762fce4f5c238da5ab36797c3d6fba1a5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Mar 2022 19:41:31 -0800 Subject: [PATCH] s3: libcli: Rename smb_key_derivation() -> smb1_key_derivation() Signed-off-by: Jeremy Allison Signed-off-by: David Mulder --- libcli/smb/smbXcli_base.c | 2 +- libcli/smb/smb_signing.c | 2 +- libcli/smb/smb_signing.h | 2 +- source3/smbd/reply.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 2c406823457..0f3e4fa3f90 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -6138,7 +6138,7 @@ NTSTATUS smb1cli_session_protect_session_key(struct smbXcli_session *session) return NT_STATUS_INVALID_PARAMETER_MIX; } - status = smb_key_derivation(session->smb1.application_key.data, + status = smb1_key_derivation(session->smb1.application_key.data, session->smb1.application_key.length, session->smb1.application_key.data); if (!NT_STATUS_IS_OK(status)) { diff --git a/libcli/smb/smb_signing.c b/libcli/smb/smb_signing.c index 0a3e1f7121e..f01865c9bc5 100644 --- a/libcli/smb/smb_signing.c +++ b/libcli/smb/smb_signing.c @@ -497,7 +497,7 @@ bool smb1_signing_is_negotiated(struct smb1_signing_state *si) return si->negotiated; } -NTSTATUS smb_key_derivation(const uint8_t *KI, +NTSTATUS smb1_key_derivation(const uint8_t *KI, size_t KI_len, uint8_t KO[16]) { diff --git a/libcli/smb/smb_signing.h b/libcli/smb/smb_signing.h index 7cefb688a07..9f2f3c15a1a 100644 --- a/libcli/smb/smb_signing.h +++ b/libcli/smb/smb_signing.h @@ -51,7 +51,7 @@ bool smb1_signing_is_mandatory(struct smb1_signing_state *si); bool smb1_signing_set_negotiated(struct smb1_signing_state *si, bool allowed, bool mandatory); bool smb1_signing_is_negotiated(struct smb1_signing_state *si); -NTSTATUS smb_key_derivation(const uint8_t *KI, +NTSTATUS smb1_key_derivation(const uint8_t *KI, size_t KI_len, uint8_t KO[16]); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 83d821d62ce..a4eb7799ccf 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -997,11 +997,11 @@ void reply_tcon_and_X(struct smb_request *req) if (tcon_flags & TCONX_FLAG_EXTENDED_SIGNATURES) { NTSTATUS status; - status = smb_key_derivation(x->global->application_key_blob.data, + status = smb1_key_derivation(x->global->application_key_blob.data, x->global->application_key_blob.length, x->global->application_key_blob.data); if (!NT_STATUS_IS_OK(status)) { - DBG_ERR("smb_key_derivation failed: %s\n", + DBG_ERR("smb1_key_derivation failed: %s\n", nt_errstr(status)); END_PROFILE(SMBtconX); return;