Blame SOURCES/net-snmp-5.9-openssl-3.0.patch

bc6b3f
diff -urNp a/snmplib/transports/snmpTLSBaseDomain.c b/snmplib/transports/snmpTLSBaseDomain.c
bc6b3f
--- a/snmplib/transports/snmpTLSBaseDomain.c	2021-05-18 11:15:09.247472175 +0200
bc6b3f
+++ b/snmplib/transports/snmpTLSBaseDomain.c	2021-05-24 09:39:29.297494727 +0200
bc6b3f
@@ -54,17 +54,6 @@ netsnmp_feature_require(cert_util);
bc6b3f
 
bc6b3f
 int openssl_local_index;
bc6b3f
 
bc6b3f
-#ifndef HAVE_ERR_GET_ERROR_ALL
bc6b3f
-/* A backport of the OpenSSL 1.1.1e ERR_get_error_all() function. */
bc6b3f
-static unsigned long ERR_get_error_all(const char **file, int *line,
bc6b3f
-                                       const char **func,
bc6b3f
-                                       const char **data, int *flags)
bc6b3f
-{
bc6b3f
-    *func = NULL;
bc6b3f
-    return ERR_get_error_line_data(file, line, data, flags);
bc6b3f
-}
bc6b3f
-#endif
bc6b3f
-
bc6b3f
 /* this is called during negotiation */
bc6b3f
 int verify_callback(int ok, X509_STORE_CTX *ctx) {
bc6b3f
     int err, depth;
bc6b3f
@@ -1218,14 +1207,14 @@ void _openssl_log_error(int rc, SSL *con
bc6b3f
     }
bc6b3f
 
bc6b3f
     /* other errors */
bc6b3f
-    while ((numerical_reason =
bc6b3f
+/*    while ((numerical_reason =
bc6b3f
             ERR_get_error_all(&file, &line, &func, &data, &flags)) != 0) {
bc6b3f
         snmp_log(LOG_ERR, "%s (file %s, func %s, line %d)\n",
bc6b3f
-                 ERR_error_string(numerical_reason, NULL), file, func, line);
bc6b3f
+                 ERR_error_string(numerical_reason, NULL), file, func, line);*/
bc6b3f
 
bc6b3f
         /* if we have a text translation: */
bc6b3f
-        if (data && (flags & ERR_TXT_STRING)) {
bc6b3f
-            snmp_log(LOG_ERR, "  Textual Error: %s\n", data);
bc6b3f
+/*        if (data && (flags & ERR_TXT_STRING)) {
bc6b3f
+            snmp_log(LOG_ERR, "  Textual Error: %s\n", data);*/
bc6b3f
             /*
bc6b3f
              * per openssl man page: If it has been allocated by
bc6b3f
              * OPENSSL_malloc(), *flags&ERR_TXT_MALLOCED is true.
bc6b3f
@@ -1234,9 +1223,9 @@ void _openssl_log_error(int rc, SSL *con
bc6b3f
              * wants a const char **, but returns something that we might
bc6b3f
              * need to free??
bc6b3f
              */
bc6b3f
-            if (flags & ERR_TXT_MALLOCED)
bc6b3f
+/*            if (flags & ERR_TXT_MALLOCED)
bc6b3f
                 OPENSSL_free(NETSNMP_REMOVE_CONST(void *, data));        }
bc6b3f
-    }
bc6b3f
+    }*/
bc6b3f
     
bc6b3f
     snmp_log(LOG_ERR, "---- End of OpenSSL Errors ----\n");
bc6b3f
 }