54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
|
|
From 8518bafe941eb6f9a1abe4d2d0a3ac18347074b4 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Bart Van Assche <bvanassche@acm.org>
|
||
|
|
Date: Wed, 8 Sep 2021 20:41:32 -0700
|
||
|
|
Subject: [PATCH] CHANGES: libsnmp: Remove netsnmp_openssl_err_log()
|
||
|
|
|
||
|
|
Remove this function since it is not used by the Net-SNMP project and
|
||
|
|
since this function should not be used in MIB implementations either.
|
||
|
|
---
|
||
|
|
include/net-snmp/library/snmp_openssl.h | 1 -
|
||
|
|
snmplib/snmp_openssl.c | 18 ------------------
|
||
|
|
2 files changed, 19 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/include/net-snmp/library/snmp_openssl.h b/include/net-snmp/library/snmp_openssl.h
|
||
|
|
index d4c8361cdd..a5054d9f13 100644
|
||
|
|
--- a/include/net-snmp/library/snmp_openssl.h
|
||
|
|
+++ b/include/net-snmp/library/snmp_openssl.h
|
||
|
|
@@ -44,7 +44,6 @@ extern "C" {
|
||
|
|
/*
|
||
|
|
* misc
|
||
|
|
*/
|
||
|
|
- void netsnmp_openssl_err_log(const char *prefix);
|
||
|
|
void netsnmp_openssl_null_checks(SSL *ssl, int *nullAuth, int *nullCipher);
|
||
|
|
|
||
|
|
/*
|
||
|
|
diff --git a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c
|
||
|
|
index 501ada8ada..a4fd3e2b54 100644
|
||
|
|
--- a/snmplib/snmp_openssl.c
|
||
|
|
+++ b/snmplib/snmp_openssl.c
|
||
|
|
@@ -938,24 +938,6 @@ netsnmp_openssl_cert_issued_by(X509 *issuer, X509 *cert)
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
-#ifndef NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG
|
||
|
|
-#ifndef ERR_GET_FUNC
|
||
|
|
-/* removed in OpenSSL 3.0 */
|
||
|
|
-#define ERR_GET_FUNC(e) -1
|
||
|
|
-#endif
|
||
|
|
-
|
||
|
|
-void
|
||
|
|
-netsnmp_openssl_err_log(const char *prefix)
|
||
|
|
-{
|
||
|
|
- unsigned long err;
|
||
|
|
- for (err = ERR_get_error(); err; err = ERR_get_error()) {
|
||
|
|
- snmp_log(LOG_ERR,"%s: %ld\n", prefix ? prefix: "openssl error", err);
|
||
|
|
- snmp_log(LOG_ERR, "library=%d, function=%d, reason=%d\n",
|
||
|
|
- ERR_GET_LIB(err), ERR_GET_FUNC(err), ERR_GET_REASON(err));
|
||
|
|
- }
|
||
|
|
-}
|
||
|
|
-#endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG */
|
||
|
|
-
|
||
|
|
void
|
||
|
|
netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher)
|
||
|
|
{
|