mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
jose: Fix compilation without deprecated OpenSSL APIs
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
21
libs/jose/patches/020-openssl-deprecated.patch
Normal file
21
libs/jose/patches/020-openssl-deprecated.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/lib/openssl/compat.h
|
||||
+++ b/lib/openssl/compat.h
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <openssl/bn.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/ec.h>
|
||||
#include <openssl/ecdsa.h>
|
||||
--- a/lib/openssl/misc.c
|
||||
+++ b/lib/openssl/misc.c
|
||||
@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, const char *plural, ...)
|
||||
static void __attribute__((constructor))
|
||||
constructor(void)
|
||||
{
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
OpenSSL_add_all_algorithms();
|
||||
+#endif
|
||||
RAND_poll();
|
||||
}
|
||||
Reference in New Issue
Block a user