Annotation of embedaddon/ntp/include/ntp_md5.h, revision 1.1.1.1
1.1 misho 1: /*
2: * ntp_md5.h: deal with md5.h headers
3: *
4: * Use the system MD5 if available, otherwise libisc's.
5: */
6: #if defined HAVE_MD5_H && defined HAVE_MD5INIT
7: # include <md5.h>
8: #else
9: # include "isc/md5.h"
10: typedef isc_md5_t MD5_CTX;
11: # define MD5Init(c) isc_md5_init(c)
12: # define MD5Update(c, p, s) isc_md5_update(c, p, s)
13: # define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
14: #endif
15:
16: /*
17: * Provide OpenSSL-alike MD5 API if we're not using OpenSSL
18: */
19: #ifndef OPENSSL
20: typedef MD5_CTX EVP_MD_CTX;
21: # define EVP_get_digestbynid(t) NULL
22: # define EVP_DigestInit(c, dt) MD5Init(c)
23: # define EVP_DigestUpdate(c, p, s) MD5Update(c, p, s)
24: # define EVP_DigestFinal(c, d, pdl) \
25: do { \
26: MD5Final((d), (c)); \
27: *(pdl) = 16; \
28: } while (0)
29: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>