mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
3e668c6d02
ChangeLog: https://github.com/ppp-project/ppp/blob/ppp-2.5.1/ChangeLog Suppressed patches: 010-use_target_for_configure.patch [1] 510-pptp_compile_fix.patch [2] 520-u_int_bsd_fix.patch [3] Upstreamed patches: 330-retain_foreign_default_routes.patch [4] 521-remove_unused_openssl_dep.patch [5] [1]e48a9b5de4
[2] Merged into "500-add-pptp-plugin.patch" [3]797cdae57c
[4]9856f47063
[5]59342ab622
Signed-off-by: Shiji Yang <yangshiji66@qq.com> Link: https://github.com/openwrt/openwrt/pull/16605 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
46 lines
1.0 KiB
Diff
46 lines
1.0 KiB
Diff
From: Shiji Yang <yangshiji66@outlook.com>
|
|
Date: Fri, 4 Oct 2024 12:19:42 +0000
|
|
Subject: [PATCH] pppd/crypto: fix build without openssl
|
|
|
|
Compile openssl relevant code only when PPP_WITH_OPENSSL is defined.
|
|
|
|
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|
---
|
|
pppd/crypto.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/pppd/crypto.c
|
|
+++ b/pppd/crypto.c
|
|
@@ -199,6 +199,7 @@ int PPP_crypto_init()
|
|
{
|
|
int retval = 0;
|
|
|
|
+#ifdef PPP_WITH_OPENSSL
|
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
|
g_crypto_ctx.legacy = OSSL_PROVIDER_load(NULL, "legacy");
|
|
if (g_crypto_ctx.legacy == NULL)
|
|
@@ -214,6 +215,7 @@ int PPP_crypto_init()
|
|
goto done;
|
|
}
|
|
#endif
|
|
+#endif
|
|
|
|
retval = 1;
|
|
|
|
@@ -224,6 +226,7 @@ done:
|
|
|
|
int PPP_crypto_deinit()
|
|
{
|
|
+#ifdef PPP_WITH_OPENSSL
|
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
|
if (g_crypto_ctx.legacy) {
|
|
OSSL_PROVIDER_unload(g_crypto_ctx.legacy);
|
|
@@ -239,6 +242,7 @@ int PPP_crypto_deinit()
|
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
ERR_free_strings();
|
|
#endif
|
|
+#endif
|
|
return 1;
|
|
}
|
|
|