]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:crypto: Document gnutls_error_to_ntstatus()
authorAndreas Schneider <asn@samba.org>
Thu, 18 Jul 2019 07:03:51 +0000 (09:03 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 26 Jul 2019 01:48:22 +0000 (01:48 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/crypto/gnutls_helpers.h

index 8a2a49baf733d5f8c38bbf8587b8617c0ed0e43b..797bfaaabf462d19da806b3b2ac72674c66d632e 100644 (file)
 #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,