Browse Source

jose: Fix compilation without deprecated OpenSSL APIs

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 6 years ago
parent
commit
e7d28760f1
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 22 additions and 1 deletions
  1. +1
    -1
      libs/jose/Makefile
  2. +0
    -0
      libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch
  3. +21
    -0
      libs/jose/patches/020-openssl-deprecated.patch

+ 1
- 1
libs/jose/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=jose PKG_NAME:=jose
PKG_VERSION:=10 PKG_VERSION:=10
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/ PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/


libs/jose/patches/Fix_minor_leak_upstream_198f720.patch → libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch View File


+ 21
- 0
libs/jose/patches/020-openssl-deprecated.patch View 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();
}

Loading…
Cancel
Save