diff options
author | Jorrit Jongma <git@jongma.org> | 2020-05-25 18:16:19 +0200 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2020-06-01 17:57:38 -0700 |
commit | 71c4ae23362bcd5a2f71127f13008f3b1b7f171d (patch) | |
tree | c8be2df3b318fe59ea498738022bf6de2ba6cb1d /lib | |
parent | c0268d9217ebe1affab268a86696c33caf21485c (diff) | |
download | rsync-71c4ae23362bcd5a2f71127f13008f3b1b7f171d.tar.gz |
Move OpenSSL-related MD4/5 defines and imports to lib/mdigest.h
Works just as well, prevents having to repeat them across files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mdigest.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/mdigest.h b/lib/mdigest.h index 86c1140f..e543d6f3 100644 --- a/lib/mdigest.h +++ b/lib/mdigest.h @@ -1,5 +1,10 @@ /* The include file for both the MD4 and MD5 routines. */ +#ifdef USE_OPENSSL +#include "openssl/md4.h" +#include "openssl/md5.h" +#endif + #define MD4_DIGEST_LEN 16 #define MD5_DIGEST_LEN 16 #define MAX_DIGEST_LEN MD5_DIGEST_LEN @@ -18,6 +23,11 @@ void mdfour_update(md_context *md, const uchar *in, uint32 length); void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]); #ifndef USE_OPENSSL +#define MD5_CTX md_context +#define MD5_Init md5_begin +#define MD5_Update md5_update +#define MD5_Final(digest, cptr) md5_result(cptr, digest) + void md5_begin(md_context *ctx); void md5_update(md_context *ctx, const uchar *input, uint32 length); void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]); |