schannel: move schannel_sign to main directory.
authorGünther Deschner <gd@samba.org>
Tue, 15 Sep 2009 16:29:10 +0000 (18:29 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 15 Sep 2009 23:54:59 +0000 (01:54 +0200)
Guenther

libcli/auth/schannel.h [moved from source4/auth/gensec/schannel.h with 92% similarity]
libcli/auth/schannel_proto.h [new file with mode: 0644]
libcli/auth/schannel_sign.c [moved from source4/auth/gensec/schannel_sign.c with 99% similarity]
source4/auth/gensec/config.mk
source4/auth/gensec/schannel.c
source4/rpc_server/netlogon/dcerpc_netlogon.c

similarity index 92%
rename from source4/auth/gensec/schannel.h
rename to libcli/auth/schannel.h
index 1ec605e5247e744016bb97b68fcb8324062375d4..bfccd950b6c92a8243c8d91ee25ab7eeb32d0a9d 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    dcerpc schannel operations
    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/>.
 */
 
 #include "libcli/auth/libcli_auth.h"
-#include "auth/gensec/schannel_state.h"
 #include "libcli/auth/schannel_state.h"
 
 enum schannel_position {
@@ -36,4 +35,4 @@ struct schannel_state {
        struct netlogon_creds_CredentialState *creds;
 };
 
-#include "auth/gensec/schannel_proto.h"
+#include "libcli/auth/schannel_proto.h"
diff --git a/libcli/auth/schannel_proto.h b/libcli/auth/schannel_proto.h
new file mode 100644 (file)
index 0000000..d31707d
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   dcerpc schannel operations
+
+   Copyright (C) Andrew Tridgell 2004
+   Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2005
+
+   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_AUTH_SCHANNEL_PROTO_H__
+#define _LIBCLI_AUTH_SCHANNEL_PROTO_H__
+
+NTSTATUS schannel_unseal_packet(struct schannel_state *state,
+                               TALLOC_CTX *mem_ctx,
+                               uint8_t *data, size_t length,
+                               const DATA_BLOB *sig);
+NTSTATUS schannel_check_packet(struct schannel_state *state,
+                              TALLOC_CTX *mem_ctx,
+                              const uint8_t *data, size_t length,
+                              const DATA_BLOB *sig);
+NTSTATUS schannel_seal_packet(struct schannel_state *state,
+                             TALLOC_CTX *mem_ctx,
+                             uint8_t *data, size_t length,
+                             DATA_BLOB *sig);
+NTSTATUS schannel_sign_packet(struct schannel_state *state,
+                             TALLOC_CTX *mem_ctx,
+                             const uint8_t *data, size_t length,
+                             DATA_BLOB *sig);
+#endif
similarity index 99%
rename from source4/auth/gensec/schannel_sign.c
rename to libcli/auth/schannel_sign.c
index ca066b102d867145dc2d8f0aae6cb2bf1c6fab1e..45f3989e11868a4f21516607c8779cb80697321a 100644 (file)
 */
 
 #include "includes.h"
+#include "../libcli/auth/schannel.h"
 #include "../lib/crypto/crypto.h"
 #include "auth/gensec/gensec.h"
 #include "auth/gensec/gensec_proto.h"
-#include "auth/gensec/schannel.h"
 
 #define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
 #define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 }
index d2e41dadd7573c7fe04094ec2b82f844df7568fc..84314f54e2e41ba345b134d6f691e4e8afc86786 100644 (file)
@@ -72,7 +72,7 @@ OUTPUT_TYPE = MERGED_OBJ
 # End MODULE gensec_schannel
 ################################################
 
-gensec_schannel_OBJ_FILES = $(addprefix $(gensecsrcdir)/, schannel.o schannel_sign.o)
+gensec_schannel_OBJ_FILES = $(addprefix $(gensecsrcdir)/, schannel.o) ../libcli/auth/schannel_sign.o
 $(eval $(call proto_header_template,$(gensecsrcdir)/schannel_proto.h,$(gensec_schannel_OBJ_FILES:.o=.c)))
 
 ################################################
index 90b90fca9c8c768c7a113655fd6ddf2bfb238209..3efaf9bccaeae08fbda6d9bad864c25e13ea53d6 100644 (file)
@@ -26,7 +26,8 @@
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
 #include "auth/gensec/gensec_proto.h"
-#include "auth/gensec/schannel.h"
+#include "../libcli/auth/schannel.h"
+#include "auth/gensec/schannel_state.h"
 #include "librpc/rpc/dcerpc.h"
 #include "param/param.h"
 #include "auth/session_proto.h"
index 4ec6b74020b577a34561c53f22c8e639b5d0e7d7..baba4157e629971a56945718e752508c31f7302d 100644 (file)
@@ -32,7 +32,8 @@
 #include "rpc_server/samr/proto.h"
 #include "../lib/util/util_ldb.h"
 #include "libcli/auth/libcli_auth.h"
-#include "auth/gensec/schannel.h"
+#include "../libcli/auth/schannel.h"
+#include "auth/gensec/schannel_state.h"
 #include "libcli/security/security.h"
 #include "param/param.h"
 #include "lib/messaging/irpc.h"