From a7169122940d8eb3e37320dc1dca4c99e0c6f37a Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet@samba.org>
Date: Fri, 16 Aug 2019 15:47:49 +1200
Subject: [PATCH 120/187] libcli/smb: Use gnutls_error_to_ntstatus() in
smb2_signing_sign_pdu()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 9d8ffc81a53b6b3d7c29f0da8fd71e696ca7e9d8)
---
libcli/smb/smb2_signing.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c
index b7c0be528b7..466fe9a49e3 100644
--- a/libcli/smb/smb2_signing.c
+++ b/libcli/smb/smb2_signing.c
@@ -114,7 +114,7 @@ NTSTATUS smb2_signing_sign_pdu(struct smb2_signing_key *signing_key,
key.data,
key.size);
if (rc < 0) {
- return NT_STATUS_NO_MEMORY;
+ return gnutls_error_to_ntstatus(rc, NT_STATUS_HMAC_NOT_SUPPORTED);
}
}
@@ -123,7 +123,7 @@ NTSTATUS smb2_signing_sign_pdu(struct smb2_signing_key *signing_key,
vector[i].iov_base,
vector[i].iov_len);
if (rc < 0) {
- return NT_STATUS_INTERNAL_ERROR;
+ return gnutls_error_to_ntstatus(rc, NT_STATUS_HMAC_NOT_SUPPORTED);
}
}
gnutls_hmac_output(signing_key->hmac_hnd, res);
--
2.23.0