|
|
b6b438 |
From bd6da0ff651385f14f8414ecb440e228d5a8a7d1 Mon Sep 17 00:00:00 2001
|
|
|
b6b438 |
From: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Date: Fri, 5 Jul 2019 10:38:44 +0200
|
|
|
b6b438 |
Subject: [PATCH 003/187] lib:crypto: Add GNUTLS_FIPS140_SET_(LAX|STRICT)_MODE
|
|
|
b6b438 |
to helpers
|
|
|
b6b438 |
|
|
|
b6b438 |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031
|
|
|
b6b438 |
|
|
|
b6b438 |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Reviewed-by: Ralph Boehme <slow@samba.org>
|
|
|
b6b438 |
(cherry picked from commit 31a943fa0890438cffc67a566373f36c94c0a5a8)
|
|
|
b6b438 |
---
|
|
|
b6b438 |
lib/crypto/gnutls_helpers.h | 11 +++++++++++
|
|
|
b6b438 |
source3/modules/hash_inode.c | 10 +---------
|
|
|
b6b438 |
2 files changed, 12 insertions(+), 9 deletions(-)
|
|
|
b6b438 |
|
|
|
b6b438 |
diff --git a/lib/crypto/gnutls_helpers.h b/lib/crypto/gnutls_helpers.h
|
|
|
b6b438 |
index 7c950c79525..8a2a49baf73 100644
|
|
|
b6b438 |
--- a/lib/crypto/gnutls_helpers.h
|
|
|
b6b438 |
+++ b/lib/crypto/gnutls_helpers.h
|
|
|
b6b438 |
@@ -18,9 +18,20 @@
|
|
|
b6b438 |
#ifndef _GNUTLS_HELPERS_H
|
|
|
b6b438 |
#define _GNUTLS_HELPERS_H
|
|
|
b6b438 |
|
|
|
b6b438 |
+#include <gnutls/gnutls.h>
|
|
|
b6b438 |
+
|
|
|
b6b438 |
#include "libcli/util/ntstatus.h"
|
|
|
b6b438 |
#include "libcli/util/werror.h"
|
|
|
b6b438 |
|
|
|
b6b438 |
+/* Those macros are only available in GnuTLS >= 3.6.4 */
|
|
|
b6b438 |
+#ifndef GNUTLS_FIPS140_SET_LAX_MODE
|
|
|
b6b438 |
+#define GNUTLS_FIPS140_SET_LAX_MODE()
|
|
|
b6b438 |
+#endif
|
|
|
b6b438 |
+
|
|
|
b6b438 |
+#ifndef GNUTLS_FIPS140_SET_STRICT_MODE
|
|
|
b6b438 |
+#define GNUTLS_FIPS140_SET_STRICT_MODE()
|
|
|
b6b438 |
+#endif
|
|
|
b6b438 |
+
|
|
|
b6b438 |
NTSTATUS _gnutls_error_to_ntstatus(int gnutls_rc,
|
|
|
b6b438 |
NTSTATUS blocked_status,
|
|
|
b6b438 |
const char *function,
|
|
|
b6b438 |
diff --git a/source3/modules/hash_inode.c b/source3/modules/hash_inode.c
|
|
|
b6b438 |
index 231538c72cb..a9144621901 100644
|
|
|
b6b438 |
--- a/source3/modules/hash_inode.c
|
|
|
b6b438 |
+++ b/source3/modules/hash_inode.c
|
|
|
b6b438 |
@@ -22,15 +22,7 @@
|
|
|
b6b438 |
|
|
|
b6b438 |
#include <gnutls/gnutls.h>
|
|
|
b6b438 |
#include <gnutls/crypto.h>
|
|
|
b6b438 |
-
|
|
|
b6b438 |
-/* Those macros are only available in GnuTLS >= 3.6.4 */
|
|
|
b6b438 |
-#ifndef GNUTLS_FIPS140_SET_LAX_MODE
|
|
|
b6b438 |
-#define GNUTLS_FIPS140_SET_LAX_MODE()
|
|
|
b6b438 |
-#endif
|
|
|
b6b438 |
-
|
|
|
b6b438 |
-#ifndef GNUTLS_FIPS140_SET_STRICT_MODE
|
|
|
b6b438 |
-#define GNUTLS_FIPS140_SET_STRICT_MODE()
|
|
|
b6b438 |
-#endif
|
|
|
b6b438 |
+#include "lib/crypto/gnutls_helpers.h"
|
|
|
b6b438 |
|
|
|
b6b438 |
SMB_INO_T hash_inode(const SMB_STRUCT_STAT *sbuf, const char *sname)
|
|
|
b6b438 |
{
|
|
|
b6b438 |
--
|
|
|
b6b438 |
2.23.0
|
|
|
b6b438 |
|