summaryrefslogtreecommitdiff
path: root/libcli/auth/smbencrypt.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-06-08 15:48:40 +1000
committerJeremy Allison <jra@samba.org>2013-06-19 21:32:36 +0200
commitfc13489c91e790ff8952aff1e7db1e6189894e30 (patch)
treeb36ce2a6e54a0141fecdc2b0561050259bb19c2c /libcli/auth/smbencrypt.c
parent5c4772ec1d562a4547391e1dd4956c43e3d635a7 (diff)
downloadsamba-fc13489c91e790ff8952aff1e7db1e6189894e30.tar.gz
build: Build with system md5.h on OpenIndiana
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
Diffstat (limited to 'libcli/auth/smbencrypt.c')
-rw-r--r--libcli/auth/smbencrypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index 372ef013b28..ec819cd4db3 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -99,7 +99,7 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
{
- struct MD5Context tctx;
+ MD5_CTX tctx;
MD5Init(&tctx);
MD5Update(&tctx, salt, 16);
MD5Update(&tctx, nthash, 16);
@@ -637,7 +637,7 @@ bool decode_pw_buffer(TALLOC_CTX *ctx,
void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key)
{
- struct MD5Context tctx;
+ MD5_CTX tctx;
unsigned char key_out[16];
/* Confounder is last 16 bytes. */
@@ -717,7 +717,7 @@ void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
struct wkssvc_PasswordBuffer **pwd_buf)
{
uint8_t buffer[516];
- struct MD5Context ctx;
+ MD5_CTX ctx;
struct wkssvc_PasswordBuffer *my_pwd_buf = NULL;
DATA_BLOB confounded_session_key;
int confounder_len = 8;
@@ -755,7 +755,7 @@ WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
char **pwd)
{
uint8_t buffer[516];
- struct MD5Context ctx;
+ MD5_CTX ctx;
size_t pwd_len;
DATA_BLOB confounded_session_key;