1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libcli:smb: Use gnutls_error_to_ntstatus() in smb2_signing_decrypt_pdu()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2019-08-23 09:27:35 +02:00 committed by Andrew Bartlett
parent 7f56e91dbe
commit b9c4990f57

View File

@ -652,7 +652,7 @@ NTSTATUS smb2_signing_decrypt_pdu(struct smb2_signing_key *decryption_key,
algo,
&key);
if (rc < 0) {
status = NT_STATUS_NO_MEMORY;
status = gnutls_error_to_ntstatus(rc, NT_STATUS_INTERNAL_ERROR);
goto out;
}
}
@ -710,10 +710,9 @@ NTSTATUS smb2_signing_decrypt_pdu(struct smb2_signing_key *decryption_key,
ptext,
&ptext_size);
if (rc < 0 || ptext_size != m_total) {
DBG_ERR("ERROR: %s\n", gnutls_strerror(rc));
TALLOC_FREE(ptext);
TALLOC_FREE(ctext);
status = NT_STATUS_INTERNAL_ERROR;
status = gnutls_error_to_ntstatus(rc, NT_STATUS_INTERNAL_ERROR);
goto out;
}