lib:crypto: Add GNUTLS_FIPS140_SET_(LAX|STRICT)_MODE to helpers
authorAndreas Schneider <asn@samba.org>
Fri, 5 Jul 2019 08:38:44 +0000 (10:38 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 9 Jul 2019 12:16:11 +0000 (12:16 +0000)
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>
lib/crypto/gnutls_helpers.h
source3/modules/hash_inode.c

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,
index 231538c72cbc1a46e631698743f53f6e9e858cff..a9144621901892d3cb7414706582bc21bf866455 100644 (file)
 
 #include <gnutls/gnutls.h>
 #include <gnutls/crypto.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
+#include "lib/crypto/gnutls_helpers.h"
 
 SMB_INO_T hash_inode(const SMB_STRUCT_STAT *sbuf, const char *sname)
 {