          EVP_MD_CTX_destroy(ctx);
  #else
          EVP_MD_CTX_cleanup(ctx);
---- a/snmplib/scapi.c
-+++ b/snmplib/scapi.c
-@@ -627,7 +627,9 @@ sc_hash(const oid * hashtype, size_t has
-         return SNMPERR_GENERR;
+Index: net-snmp-5.7.3/snmplib/scapi.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/scapi.c
++++ net-snmp-5.7.3/snmplib/scapi.c
+@@ -488,7 +488,9 @@ sc_hash(const oid * hashtype, size_t has
+     }
  
  /** initialize the pointer */
 -#ifdef HAVE_EVP_MD_CTX_CREATE

     ctx = EVP_MD_CTX_create();
 #else
     ctx = malloc(sizeof(*ctx));
@@ -278,7 +280,9 @@ generate_Ku(const oid * hashtype, u_int
     memset(buf, 0, sizeof(buf));
 #ifdef NETSNMP_USE_OPENSSL
     if (ctx) {

 
     key_len = DH_size(dh);
     if (!key_len) {
Index: net-snmp-5.7.3/configure.d/config_os_libs2
===================================================================
--- net-snmp-5.7.3.orig/configure.d/config_os_libs2
+++ net-snmp-5.7.3/configure.d/config_os_libs2
@@ -293,10 +293,16 @@ if test "x$tryopenssl" != "xno" -a "x$tr
                     [Define to 1 if you have the `AES_cfb128_encrypt' function.]))
 
             AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create,
-                AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [],
