962144
diff -urNp a/include/net-snmp/library/snmp_openssl.h b/include/net-snmp/library/snmp_openssl.h
962144
--- a/include/net-snmp/library/snmp_openssl.h	2021-09-15 07:55:39.829901038 +0200
962144
+++ b/include/net-snmp/library/snmp_openssl.h	2021-09-15 07:56:18.656412998 +0200
962144
@@ -44,7 +44,6 @@ extern          "C" {
962144
     /*
962144
      * misc
962144
      */
962144
-    void netsnmp_openssl_err_log(const char *prefix);
962144
     void netsnmp_openssl_null_checks(SSL *ssl, int *nullAuth, int *nullCipher);
962144
 
962144
     /*
962144
diff -urNp a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c
962144
--- a/snmplib/snmp_openssl.c	2021-09-15 07:55:39.785900458 +0200
962144
+++ b/snmplib/snmp_openssl.c	2021-09-15 07:57:30.914417600 +0200
962144
@@ -937,20 +937,6 @@ netsnmp_openssl_cert_issued_by(X509 *iss
962144
     return (X509_check_issued(issuer, cert) == X509_V_OK);
962144
 }
962144
 
962144
-
962144
-#ifndef NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG
962144
-void
962144
-netsnmp_openssl_err_log(const char *prefix)
962144
-{
962144
-    unsigned long err;
962144
-    for (err = ERR_get_error(); err; err = ERR_get_error()) {
962144
-        snmp_log(LOG_ERR,"%s: %ld\n", prefix ? prefix: "openssl error", err);
962144
-        snmp_log(LOG_ERR, "library=%d, function=%d, reason=%d\n",
962144
-                 ERR_GET_LIB(err), ERR_GET_FUNC(err), ERR_GET_REASON(err));
962144
-    }
962144
-}
962144
-#endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG */
962144
-
962144
 void
962144
 netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher)
962144
 {
962144
diff -urNp a/snmplib/transports/snmpTLSBaseDomain.c b/snmplib/transports/snmpTLSBaseDomain.c
962144
--- a/snmplib/transports/snmpTLSBaseDomain.c	2021-05-18 11:15:09.247472175 +0200
962144
+++ b/snmplib/transports/snmpTLSBaseDomain.c	2021-05-24 09:39:29.297494727 +0200
962144
@@ -54,17 +54,6 @@ netsnmp_feature_require(cert_util);
962144
 
962144
 int openssl_local_index;
962144
 
962144
-#ifndef HAVE_ERR_GET_ERROR_ALL
962144
-/* A backport of the OpenSSL 1.1.1e ERR_get_error_all() function. */
962144
-static unsigned long ERR_get_error_all(const char **file, int *line,
962144
-                                       const char **func,
962144
-                                       const char **data, int *flags)
962144
-{
962144
-    *func = NULL;
962144
-    return ERR_get_error_line_data(file, line, data, flags);
962144
-}
962144
-#endif
962144
-
962144
 /* this is called during negotiation */
962144
 int verify_callback(int ok, X509_STORE_CTX *ctx) {
962144
     int err, depth;
962144
@@ -1187,27 +1176,6 @@ void _openssl_log_error(int rc, SSL *con
962144
                  ERR_reason_error_string(ERR_get_error()));
962144
 
962144
     }
962144
-
962144
-    /* other errors */
962144
-    while ((numerical_reason =
962144
-            ERR_get_error_all(&file, &line, &func, &data, &flags)) != 0) {
962144
-        snmp_log(LOG_ERR, "%s (file %s, func %s, line %d)\n",
962144
-                 ERR_error_string(numerical_reason, NULL), file, func, line);
962144
-
962144
-        /* if we have a text translation: */
962144
-        if (data && (flags & ERR_TXT_STRING)) {
962144
-            snmp_log(LOG_ERR, "  Textual Error: %s\n", data);
962144
-            /*
962144
-             * per openssl man page: If it has been allocated by
962144
-             * OPENSSL_malloc(), *flags&ERR_TXT_MALLOCED is true.
962144
-             *
962144
-             * arggh... stupid openssl prototype for ERR_get_error_line_data
962144
-             * wants a const char **, but returns something that we might
962144
-             * need to free??
962144
-             */
962144
-            if (flags & ERR_TXT_MALLOCED)
962144
-                OPENSSL_free(NETSNMP_REMOVE_CONST(void *, data));        }
962144
-    }
962144
     
962144
     snmp_log(LOG_ERR, "---- End of OpenSSL Errors ----\n");
962144
 }