summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/smb/smb2_signing.c (renamed from source3/smbd/smb2_signing.c)3
-rw-r--r--libcli/smb/smb2_signing.h34
-rw-r--r--libcli/smb/smb_common.h1
-rw-r--r--libcli/smb/wscript_build7
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/smbd/globals.h7
-rwxr-xr-xsource3/wscript_build1
7 files changed, 42 insertions, 13 deletions
diff --git a/source3/smbd/smb2_signing.c b/libcli/smb/smb2_signing.c
index 1c0dd5ef68..3687ace9b4 100644
--- a/source3/smbd/smb2_signing.c
+++ b/libcli/smb/smb2_signing.c
@@ -19,8 +19,7 @@
*/
#include "includes.h"
-#include "smbd/smbd.h"
-#include "smbd/globals.h"
+#include "system/filesys.h"
#include "../libcli/smb/smb_common.h"
#include "../lib/crypto/crypto.h"
diff --git a/libcli/smb/smb2_signing.h b/libcli/smb/smb2_signing.h
new file mode 100644
index 0000000000..3c3e0c2881
--- /dev/null
+++ b/libcli/smb/smb2_signing.h
@@ -0,0 +1,34 @@
+/*
+ Unix SMB/CIFS implementation.
+ SMB2 signing
+
+ Copyright (C) Stefan Metzmacher 2009
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LIBCLI_SMB_SMB2_SIGNING_H_
+#define _LIBCLI_SMB_SMB2_SIGNING_H_
+
+struct iovec;
+
+NTSTATUS smb2_signing_sign_pdu(DATA_BLOB session_key,
+ struct iovec *vector,
+ int count);
+
+NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
+ const struct iovec *vector,
+ int count);
+
+#endif /* _LIBCLI_SMB_SMB2_SIGNING_H_ */
diff --git a/libcli/smb/smb_common.h b/libcli/smb/smb_common.h
index 83f7db2dfa..1f21e553ba 100644
--- a/libcli/smb/smb_common.h
+++ b/libcli/smb/smb_common.h
@@ -24,6 +24,7 @@
#include "libcli/smb/smb2_constants.h"
#include "libcli/smb/smb2_create_blob.h"
+#include "libcli/smb/smb2_signing.h"
#include "libcli/smb/smb_constants.h"
#include "libcli/smb/smb_util.h"
#include "libcli/smb/smb_unix_ext.h"
diff --git a/libcli/smb/wscript_build b/libcli/smb/wscript_build
index 89ecf519ec..66319e9a5b 100644
--- a/libcli/smb/wscript_build
+++ b/libcli/smb/wscript_build
@@ -2,9 +2,12 @@
bld.SAMBA_LIBRARY('cli_smb_common',
- source='smb2_create_blob.c util.c',
+ source='smb2_create_blob.c smb2_signing.c util.c',
autoproto='smb_common_proto.h',
+ deps='LIBCRYPTO',
public_deps='talloc samba-util',
private_library=True,
- public_headers='smb_common.h smb2_constants.h smb2_create_blob.h',
+ public_headers='''smb_common.h smb2_constants.h
+ smb2_create_blob.h smb2_signing.h
+ ''',
)
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9236750923..bf66af4708 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -601,6 +601,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
libsmb/smb2cli_tcon.o \
libsmb/smb2cli_create.o \
../libcli/smb/smb2_create_blob.o \
+ ../libcli/smb/smb2_signing.o \
libsmb/smb2cli_close.o \
libsmb/smb2cli_flush.o \
libsmb/smb2cli_read.o \
@@ -929,7 +930,6 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
smbd/file_access.o \
smbd/dnsregister.o smbd/globals.o \
smbd/smb2_server.o \
- smbd/smb2_signing.o \
smbd/smb2_glue.o \
smbd/smb2_negprot.o \
smbd/smb2_sesssetup.o \
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 35c44eebb5..2e59d9bc5f 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -133,13 +133,6 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn);
void smbd_lock_socket(struct smbd_server_connection *sconn);
void smbd_unlock_socket(struct smbd_server_connection *sconn);
-NTSTATUS smb2_signing_sign_pdu(DATA_BLOB session_key,
- struct iovec *vector,
- int count);
-NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
- const struct iovec *vector,
- int count);
-
NTSTATUS smbd_do_locking(struct smb_request *req,
files_struct *fsp,
uint8_t type,
diff --git a/source3/wscript_build b/source3/wscript_build
index a144549870..5414e6c45a 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -377,7 +377,6 @@ SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
smbd/file_access.c
smbd/dnsregister.c smbd/globals.c
smbd/smb2_server.c
- smbd/smb2_signing.c
smbd/smb2_glue.c
smbd/smb2_negprot.c
smbd/smb2_sesssetup.c