lib:crypto: Add GNUTLS_FIPS140_SET_(LAX|STRICT)_MODE to helpers
[samba.git] / lib / crypto / gnutls_helpers.h
index 7c950c79525d319e1a329d2ed0fbc09f56cd9533..8a2a49baf733d5f8c38bbf8587b8617c0ed0e43b 100644 (file)
 #ifndef _GNUTLS_HELPERS_H
 #define _GNUTLS_HELPERS_H
 
+#include <gnutls/gnutls.h>
+
 #include "libcli/util/ntstatus.h"
 #include "libcli/util/werror.h"
 
+/* Those macros are only available in GnuTLS >= 3.6.4 */
+#ifndef GNUTLS_FIPS140_SET_LAX_MODE
+#define GNUTLS_FIPS140_SET_LAX_MODE()
+#endif
+
+#ifndef GNUTLS_FIPS140_SET_STRICT_MODE
+#define GNUTLS_FIPS140_SET_STRICT_MODE()
+#endif
+
 NTSTATUS _gnutls_error_to_ntstatus(int gnutls_rc,
                                   NTSTATUS blocked_status,
                                   const char *function,