summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-07-05 10:38:44 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-07-09 12:16:11 +0000
commit31a943fa0890438cffc67a566373f36c94c0a5a8 (patch)
tree56325ac9081ba1be67d360a185502d5835f798ee /lib/crypto
parenta31a40b41a18ae09a4e2e76f41c95b011ed30bea (diff)
downloadsamba-31a943fa0890438cffc67a566373f36c94c0a5a8.tar.gz
lib:crypto: Add GNUTLS_FIPS140_SET_(LAX|STRICT)_MODE to helpers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/gnutls_helpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/crypto/gnutls_helpers.h b/lib/crypto/gnutls_helpers.h
index 7c950c79525..8a2a49baf73 100644
--- a/lib/crypto/gnutls_helpers.h
+++ b/lib/crypto/gnutls_helpers.h
@@ -18,9 +18,20 @@
#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,