summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-07-18 09:03:51 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-07-26 01:48:22 +0000
commit5e62358fbf9ed107ed4a5eb82b62e82ae5638262 (patch)
tree40749daf9a45bb0a6c1316196669b672340c0e2d /lib/crypto
parent3913b9a4088b83d6ed7f94d136a26ecfa7e16b35 (diff)
downloadsamba-5e62358fbf9ed107ed4a5eb82b62e82ae5638262.tar.gz
lib:crypto: Document gnutls_error_to_ntstatus()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/gnutls_helpers.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/crypto/gnutls_helpers.h b/lib/crypto/gnutls_helpers.h
index 8a2a49baf73..797bfaaabf4 100644
--- a/lib/crypto/gnutls_helpers.h
+++ b/lib/crypto/gnutls_helpers.h
@@ -32,6 +32,21 @@
#define GNUTLS_FIPS140_SET_STRICT_MODE()
#endif
+#ifdef DOXYGEN
+/**
+ * @brief Convert a gnutls error code to a corresponding NTSTATUS.
+ *
+ * @param[in] gnutls_rc The GnuTLS return code.
+ *
+ * @param[in] blocked_status The NTSTATUS return code which should be returned
+ * in case the e.g. the cipher might be blocked due
+ * to FIPS mode.
+ *
+ * @return A corresponding NTSTATUS code.
+ */
+NTSTATUS gnutls_error_to_ntstatus(int gnutls_rc,
+ NTSTATUS blocked_status);
+#else
NTSTATUS _gnutls_error_to_ntstatus(int gnutls_rc,
NTSTATUS blocked_status,
const char *function,
@@ -39,6 +54,7 @@ NTSTATUS _gnutls_error_to_ntstatus(int gnutls_rc,
#define gnutls_error_to_ntstatus(gnutls_rc, blocked_status) \
_gnutls_error_to_ntstatus(gnutls_rc, blocked_status, \
__FUNCTION__, __location__)
+#endif
WERROR _gnutls_error_to_werror(int gnutls_rc,
WERROR blocked_werr,