From fc13489c91e790ff8952aff1e7db1e6189894e30 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 8 Jun 2013 15:48:40 +1000 Subject: 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 Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104 --- auth/credentials/credentials_ntlm.c | 2 +- auth/ntlmssp/ntlmssp_server.c | 2 +- auth/ntlmssp/ntlmssp_sign.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'auth') diff --git a/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c index 2d6d6f6c55..8f143bf3c0 100644 --- a/auth/credentials/credentials_ntlm.c +++ b/auth/credentials/credentials_ntlm.c @@ -110,7 +110,7 @@ _PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred /* LM Key is incompatible... */ *flags &= ~CLI_CRED_LANMAN_AUTH; } else if (*flags & CLI_CRED_NTLM2) { - struct MD5Context md5_session_nonce_ctx; + MD5_CTX md5_session_nonce_ctx; uint8_t session_nonce[16]; uint8_t session_nonce_hash[16]; uint8_t user_session_key[16]; diff --git a/auth/ntlmssp/ntlmssp_server.c b/auth/ntlmssp/ntlmssp_server.c index 442bd5db49..57179e1dca 100644 --- a/auth/ntlmssp/ntlmssp_server.c +++ b/auth/ntlmssp/ntlmssp_server.c @@ -369,7 +369,7 @@ static NTSTATUS ntlmssp_server_preauth(struct gensec_security *gensec_security, */ if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) { if (ntlmssp_state->nt_resp.length == 24 && ntlmssp_state->lm_resp.length == 24) { - struct MD5Context md5_session_nonce_ctx; + MD5_CTX md5_session_nonce_ctx; state->doing_ntlm2 = true; memcpy(state->session_nonce, ntlmssp_state->internal_chal.data, 8); diff --git a/auth/ntlmssp/ntlmssp_sign.c b/auth/ntlmssp/ntlmssp_sign.c index 4d07a81e44..c0be91465b 100644 --- a/auth/ntlmssp/ntlmssp_sign.c +++ b/auth/ntlmssp/ntlmssp_sign.c @@ -51,7 +51,7 @@ static void calc_ntlmv2_key(uint8_t subkey[16], DATA_BLOB session_key, const char *constant) { - struct MD5Context ctx3; + MD5_CTX ctx3; MD5Init(&ctx3); MD5Update(&ctx3, session_key.data, session_key.length); MD5Update(&ctx3, (const uint8_t *)constant, strlen(constant)+1); -- cgit