1 Star 0 Fork 15

liyunqing_kl/net-snmp

forked from src-openEuler/net-snmp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-libsnmp-Remove-netsnmp_openssl_err_log.patch 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
eaglegai 提交于 2023-02-03 02:52 . fix build with openssl 3.0
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)
{
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li_yunq/net-snmp.git
git@gitee.com:li_yunq/net-snmp.git
li_yunq
net-snmp
net-snmp
master

搜索帮助