/*
* ntp_md5.h: deal with md5.h headers
*
* Use the system MD5 if available, otherwise libisc's.
*/
#ifndef NTP_MD5_H
#define NTP_MD5_H
/* Use the system MD5 or fall back on libisc's */
# if defined HAVE_MD5_H && defined HAVE_MD5INIT
# include <md5.h>
# else
# include "isc/md5.h"
typedef isc_md5_t MD5_CTX;
# define MD5_DIGEST_LENGTH ISC_MD5_DIGESTLENGTH
# define MD5Init(c) isc_md5_init(c)
# define MD5Update(c, p, s) isc_md5_update(c, (const void *)p, s)
# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
# endif
# define KEY_TYPE_MD5 NID_md5
#ifdef OPENSSL
# include <openssl/evp.h>
# include "libssl_compat.h"
# ifdef HAVE_OPENSSL_CMAC_H
# include <openssl/cmac.h>
# define CMAC "AES128CMAC"
# define AES_128_KEY_SIZE 16
# endif /*HAVE_OPENSSL_CMAC_H*/
#else /* !OPENSSL follows */
/*
* Provide OpenSSL-alike MD5 API if we're not using OpenSSL
*/