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 --- source4/libcli/raw/smb_signing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c index 5d2f928747..405efab618 100644 --- a/source4/libcli/raw/smb_signing.c +++ b/source4/libcli/raw/smb_signing.c @@ -81,7 +81,7 @@ bool signing_good(struct smb_signing_context *sign_info, void sign_outgoing_message(struct smb_request_buffer *out, DATA_BLOB *mac_key, unsigned int seq_num) { uint8_t calc_md5_mac[16]; - struct MD5Context md5_ctx; + MD5_CTX md5_ctx; /* * Firstly put the sequence number into the first 4 bytes. @@ -116,7 +116,7 @@ bool check_signed_incoming_message(struct smb_request_buffer *in, DATA_BLOB *mac uint8_t calc_md5_mac[16]; uint8_t *server_sent_mac; uint8_t sequence_buf[8]; - struct MD5Context md5_ctx; + MD5_CTX md5_ctx; const size_t offset_end_of_sig = (HDR_SS_FIELD + 8); int i; const int sign_range = 0; -- cgit