diff options
author | Andreas Schneider <asn@samba.org> | 2019-06-24 13:18:32 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-06-27 12:54:22 +0000 |
commit | d4494648dd274328b57a99889bd23440c19f75fd (patch) | |
tree | 6397b27cefbc1d64e5b7dd7e7ea52d73f654018d /libcli | |
parent | d1641f3e6a7a760a669ff2d9aa45dc2f4c61071b (diff) | |
download | samba-d4494648dd274328b57a99889bd23440c19f75fd.tar.gz |
libcli:auth: Use gnutls_error_to_werror() in smbencrypt
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/smbencrypt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c index 65d1bdce9bf..a74ccf09b02 100644 --- a/libcli/auth/smbencrypt.c +++ b/libcli/auth/smbencrypt.c @@ -28,6 +28,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_ntlmssp.h" +#include "lib/crypto/gnutls_helpers.h" #include <gnutls/gnutls.h> #include <gnutls/crypto.h> @@ -1028,20 +1029,20 @@ WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx, rc = gnutls_hash_init(&hash_hnd, GNUTLS_DIG_MD5); if (rc < 0) { - result = WERR_NOT_ENOUGH_MEMORY; + result = gnutls_error_to_werror(rc, WERR_CONTENT_BLOCKED); goto out; } rc = gnutls_hash(hash_hnd, session_key->data, session_key->length); if (rc < 0) { gnutls_hash_deinit(hash_hnd, NULL); - result = WERR_INTERNAL_ERROR; + result = gnutls_error_to_werror(rc, WERR_CONTENT_BLOCKED); goto out; } rc = gnutls_hash(hash_hnd, confounder, confounder_len); if (rc < 0) { gnutls_hash_deinit(hash_hnd, NULL); - result = WERR_INTERNAL_ERROR; + result = gnutls_error_to_werror(rc, WERR_CONTENT_BLOCKED); goto out; } gnutls_hash_deinit(hash_hnd, confounded_session_key.data); |