mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 07:34:40 +01:00
Added compatibility patch for LibreSSL 4.0. Refreshed other patches. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20851 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
32 lines
922 B
Diff
32 lines
922 B
Diff
From aa71510f843d5cce5f75b6abfa3a70caeacbe36d Mon Sep 17 00:00:00 2001
|
|
From: Rosen Penev <rosenp@gmail.com>
|
|
Date: Thu, 20 Nov 2025 18:26:52 -0800
|
|
Subject: [PATCH] fix usage under LibreSSL > 3
|
|
|
|
crypto needs to be initialized as the context relies on it.
|
|
|
|
Fixes crash in EVP_DigestInit_ex being called with a NULL digest.
|
|
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
---
|
|
src/apk.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/src/apk.c
|
|
+++ b/src/apk.c
|
|
@@ -571,6 +571,7 @@ int main(int argc, char **argv)
|
|
apk_argv[argc] = NULL;
|
|
apk_argv[argc+1] = NULL;
|
|
|
|
+ apk_crypto_init();
|
|
apk_ctx_init(&ctx);
|
|
umask(0);
|
|
setup_terminal();
|
|
@@ -583,7 +584,6 @@ int main(int argc, char **argv)
|
|
if (applet->parse) applet->parse(applet_ctx, &ctx, APK_OPTIONS_INIT, NULL);
|
|
}
|
|
|
|
- apk_crypto_init();
|
|
apk_io_url_init(&ctx.out);
|
|
apk_io_url_set_timeout(60);
|
|
apk_io_url_set_redirect_callback(redirect_callback);
|