#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include <openssl/opensslconf.h>
-#include <openssl/lhash.h>
-#include <openssl/crypto.h>
+#include <openssl/opensslconf_legacy.h>
+#include <openssl/lhash_legacy.h>
+#include <openssl/crypto_legacy.h>
#include "cryptlib.h"
-#include <openssl/buffer.h>
-#include <openssl/err.h>
-#include <openssl/crypto.h>
+#include <openssl/buffer_legacy.h>
+#include <openssl/opensslerr.h>
+#include <openssl/crypto_legacy.h>
static LHASH *error_hash=NULL;