1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

s3: Remove unused cli_[en|de]crypt_message

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon May 23 12:15:33 CEST 2011 on sn-devel-104
This commit is contained in:
Volker Lendecke 2011-05-22 19:14:44 +02:00 committed by Volker Lendecke
parent 1a393b7cd6
commit 28d7282738
2 changed files with 0 additions and 45 deletions

View File

@ -811,8 +811,6 @@ void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
bool cli_encryption_on(struct cli_state *cli);
void cli_free_encryption_context(struct cli_state *cli);
void cli_free_enc_buffer(struct cli_state *cli, char *buf);
NTSTATUS cli_decrypt_message(struct cli_state *cli);
NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
/* The following definitions come from libsmb/clisigning.c */

View File

@ -465,46 +465,3 @@ void cli_free_enc_buffer(struct cli_state *cli, char *buf)
*/
common_free_enc_buffer(cli->trans_enc_state, buf);
}
/******************************************************************************
Decrypt an incoming buffer.
******************************************************************************/
NTSTATUS cli_decrypt_message(struct cli_state *cli)
{
NTSTATUS status;
uint16 enc_ctx_num;
/* Ignore non-session messages. */
if(CVAL(cli->inbuf,0)) {
return NT_STATUS_OK;
}
status = get_enc_ctx_num((const uint8_t *)cli->inbuf, &enc_ctx_num);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (enc_ctx_num != cli->trans_enc_state->enc_ctx_num) {
return NT_STATUS_INVALID_HANDLE;
}
return common_decrypt_buffer(cli->trans_enc_state, cli->inbuf);
}
/******************************************************************************
Encrypt an outgoing buffer. Return the encrypted pointer in buf_out.
******************************************************************************/
NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out)
{
/* Ignore non-session messages. */
if (CVAL(buf,0)) {
return NT_STATUS_OK;
}
/* If we supported multiple encrytion contexts
* here we'd look up based on tid.
*/
return common_encrypt_buffer(cli->trans_enc_state, buf, buf_out);
}