}
NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key,
- uint16_t cipher_id,
struct iovec *vector,
int count)
{
+ uint16_t cipher_id;
uint8_t *tf;
size_t a_total;
ssize_t m_total;
DBG_WARNING("No encryption key for SMB2 signing\n");
return NT_STATUS_ACCESS_DENIED;
}
+ cipher_id = encryption_key->cipher_algo_id;
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
}
NTSTATUS smb2_signing_decrypt_pdu(struct smb2_signing_key *decryption_key,
- uint16_t cipher_id,
struct iovec *vector,
int count)
{
+ uint16_t cipher_id;
uint8_t *tf;
uint16_t flags;
size_t a_total;
DBG_WARNING("No decryption key for SMB2 signing\n");
return NT_STATUS_ACCESS_DENIED;
}
+ cipher_id = decryption_key->cipher_algo_id;
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
uint8_t *KO, size_t KO_len);
NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key,
- uint16_t cipher_id,
struct iovec *vector,
int count);
NTSTATUS smb2_signing_decrypt_pdu(struct smb2_signing_key *decryption_key,
- uint16_t cipher_id,
struct iovec *vector,
int count);
}
status = smb2_signing_encrypt_pdu(encryption_key,
- state->conn->smb2.server.cipher,
&iov[tf_iov], num_iov - tf_iov);
if (!NT_STATUS_IS_OK(status)) {
return status;
tf_iov[1].iov_len = enc_len;
status = smb2_signing_decrypt_pdu(s->smb2->decryption_key,
- conn->smb2.server.cipher,
tf_iov, 2);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(iov);
tf_iov[1].iov_len = enc_len;
status = smb2_signing_decrypt_pdu(s->global->decryption_key,
- xconn->smb2.server.cipher,
tf_iov, 2);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(iov_alloc);
*/
if (firsttf->iov_len == SMB2_TF_HDR_SIZE) {
status = smb2_signing_encrypt_pdu(req->first_enc_key,
- xconn->smb2.server.cipher,
firsttf,
nreq->out.vector_count - first_idx);
if (!NT_STATUS_IS_OK(status)) {
struct smb2_signing_key *encryption_key = x->global->encryption_key;
status = smb2_signing_encrypt_pdu(encryption_key,
- xconn->smb2.server.cipher,
&state->vector[1+SMBD_SMB2_TF_IOV_OFS],
SMBD_SMB2_NUM_IOV_PER_REQ);
if (!NT_STATUS_IS_OK(status)) {
*/
if (firsttf->iov_len == SMB2_TF_HDR_SIZE) {
status = smb2_signing_encrypt_pdu(req->first_enc_key,
- xconn->smb2.server.cipher,
firsttf,
req->out.vector_count - first_idx);
if (!NT_STATUS_IS_OK(status)) {