*/
#include "includes.h"
+#include "lib/crypto/crypto.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
#include "lib/socket/socket.h"
#include "libcli/ldap/ldap.h"
#include "nameserv.h"
-#include "secrets.h"
#include "byteorder.h"
-#include "md5.h"
-#include "hmacmd5.h"
-
-
#include "module.h"
#include "asn_1.h"
#define MAX_DGRAM_SIZE (576) /* tcp/ip datagram limit is 576 bytes */
#define MIN_DGRAM_SIZE 12
+/* A netbios name structure. */
+struct nmb_name {
+ char name[17];
+ char scope[64];
+ uint_t name_type;
+};
+
/*********************************************************
Types of reply packet.
**********************************************************/
#include "smb_macros.h"
-/* A netbios name structure. */
-struct nmb_name {
- char name[17];
- char scope[64];
- uint_t name_type;
-};
-
-
#include "rpc_secdes.h"
#include "client.h"
struct auth_methods;
struct schannel_state;
struct spnego_data;
+struct gensec_security;
typedef NTSTATUS (*gensec_password_callback)(struct gensec_security *gensec_security, TALLOC_CTX *mem_ctx,
char **password);
SMB_SUBSYSTEM_MK(LIBREPLACE,lib/basic.mk)
SMB_SUBSYSTEM_MK(LIBNETIF,lib/basic.mk)
+SMB_SUBSYSTEM_NOPROTO(LIBCRYPTO)
+SMB_SUBSYSTEM_MK(LIBCRYPTO,lib/basic.mk)
SMB_SUBSYSTEM_MK(LIBBASIC,lib/basic.mk)
# End SUBSYSTEM LIBNETIF
##############################
+##############################
+# Start SUBSYSTEM LIBCRYPTO
+[SUBSYSTEM::LIBCRYPTO]
+INIT_OBJ_FILES = \
+ lib/crypto/crc32.o
+ADD_OBJ_FILES = \
+ lib/crypto/md5.o \
+ lib/crypto/hmacmd5.o \
+ lib/crypto/md4.o
+# End SUBSYSTEM LIBCRYPTO
+##############################
+
+
##############################
# Start SUBSYSTEM LIBBASIC
[SUBSYSTEM::LIBBASIC]
lib/module.o \
lib/mutex.o \
lib/events.o \
- lib/crypto/crc32.o \
- lib/crypto/md5.o \
- lib/crypto/hmacmd5.o \
- lib/crypto/md4.o \
lib/db_wrap.o \
lib/server_mutex.o \
lib/idtree.o
REQUIRED_SUBSYSTEMS = \
- LIBTDB CHARSET LIBREPLACE LIBNETIF
+ LIBTDB CHARSET LIBREPLACE LIBNETIF LIBCRYPTO
# End SUBSYSTEM LIBBASIC
##############################
--- /dev/null
+uint32_t crc32_calc_buffer( const char *buffer, uint32_t count);
+
--- /dev/null
+/*
+ Unix SMB/CIFS implementation.
+
+ Copyright (C) Andrew Tridgell 2004
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "lib/crypto/md5.h"
+#include "lib/crypto/md4.h"
+#include "lib/crypto/hmacmd5.h"
+#include "lib/crypto/crc32.h"
*/
#include "includes.h"
+#include "lib/crypto/crypto.h"
/***********************************************************************
the rfc 2104 version of hmac_md5 initialisation.
} HMACMD5Context;
+void hmac_md5_init_limK_to_64(const uint8_t *key, int key_len,
+ HMACMD5Context *ctx);
+void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context *ctx);
+void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx);
+void hmac_md5(const uint8_t key[16], const uint8_t *data, int data_len, uint8_t *digest);
+void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx);
+
#endif /* _HMAC_MD5_H */
--- /dev/null
+void mdfour(uint8_t *out, const uint8_t *in, int n);
#include "includes.h"
#include "system/iconv.h"
+#include "lib/crypto/crypto.h"
static unsigned char hash[258];
static uint32 counter;
#include "includes.h"
#include "system/time.h"
#include "auth/auth.h"
+#include "lib/crypto/crypto.h"
/*
initialise the credentials state for old-style 64 bit session keys
#include "includes.h"
#include "auth/auth.h"
+#include "lib/crypto/crypto.h"
static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state *ntlmssp_state,
TALLOC_CTX *out_mem_ctx,
#include "includes.h"
#include "auth/auth.h"
+#include "lib/crypto/crypto.h"
#define CLI_SIGN "session key to client-to-server signing key magic constant"
#define CLI_SEAL "session key to client-to-server sealing key magic constant"
*/
#include "includes.h"
+#include "lib/crypto/crypto.h"
struct schannel_state {
uint8_t session_key[16];
#include "includes.h"
#include "libcli/raw/libcliraw.h"
+#include "lib/crypto/crypto.h"
/***********************************************************
SMB signing - Common code before we set a new signing implementation
#include "includes.h"
#include "system/time.h"
#include "auth/auth.h"
+#include "lib/crypto/crypto.h"
/*
This implements the X/Open SMB password encryption
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
+#include "lib/crypto/crypto.h"
/*
* do a password change using DCERPC/SAMR calls
such as the local SID and machine trust password */
#include "includes.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
#include "rpc_server/common/common.h"
#include "rpc_server/samr/dcesrv_samr.h"
#include "system/time.h"
+#include "lib/crypto/crypto.h"
/*
samr_ChangePasswordUser
#include "includes.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_samr.h"
+#include "lib/crypto/crypto.h"
#define TEST_ACCOUNT_NAME "samrtorturetest"
#define TEST_ALIASNAME "samrtorturetestalias"