Merge pull request #627 from micmac1/21.02-seb-backports

[21.02] freeswitch/sngrep backports
This commit is contained in:
micmac1 2021-03-21 19:55:31 +01:00 committed by GitHub
commit 3179b75fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 118 deletions

View file

@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libks PKG_NAME:=libks
PKG_VERSION:=1.6.0 PKG_VERSION:=1.7.0
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/signalwire/libks/tar.gz/$(PKG_VERSION)? PKG_SOURCE_URL:=https://codeload.github.com/signalwire/libks/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=1638b489df1e7c4ef81ebe08c2b6256d942a2ac1b477fb36f3920b9d1f0b7166 PKG_HASH:=73c5751eadad4d3390d61b9765e9b860e0aba7336044ecf8b007dfc1818baa69
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1 CMAKE_INSTALL:=1

View file

@ -5,7 +5,7 @@
#include(cmake/cotire.cmake) #include(cmake/cotire.cmake)
+# Declare our project, libks +# Declare our project, libks
+project(LibKS VERSION 1.6.0 LANGUAGES C CXX) +project(LibKS VERSION 1.7.0 LANGUAGES C CXX)
+message("LibKS Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") +message("LibKS Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ +
# Load our common utility api and setup the platfomrm and build # Load our common utility api and setup the platfomrm and build
@ -16,7 +16,7 @@
endif() endif()
-# Declare our project, libks -# Declare our project, libks
-project(LibKS VERSION 1.6.0 LANGUAGES C CXX) -project(LibKS VERSION 1.7.0 LANGUAGES C CXX)
-message("LibKS Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") -message("LibKS Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- -
# Set package version # Set package version

View file

@ -1,99 +0,0 @@
--- a/src/include/libks/ks_ssl.h
+++ b/src/include/libks/ks_ssl.h
@@ -25,6 +25,8 @@
#include <openssl/ssl.h>
#include <openssl/engine.h>
#include <openssl/x509v3.h>
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
KS_BEGIN_EXTERN_C
--- a/src/include/libks/kws.h
+++ b/src/include/libks/kws.h
@@ -22,6 +22,8 @@
#pragma once
+#include <openssl/err.h>
+
#define WEBSOCKET_GUID "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
#define B64BUFFLEN 1024
#define KWS_MAX_HEADERS 64
--- a/src/ks_ssl.c
+++ b/src/ks_ssl.c
@@ -30,6 +30,7 @@ static int ssl_count = 0;
static int is_init = 0;
static ks_bool_t skip_ssl = KS_FALSE;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
static inline void ks_ssl_lock_callback(int mode, int type, char *file, int line)
{
if (mode & CRYPTO_LOCK) {
@@ -44,6 +45,7 @@ static inline unsigned long ks_ssl_thread_id(void)
{
return ks_thread_self_id();
}
+#endif
KS_DECLARE(void) ks_ssl_init_skip(ks_bool_t skip)
{
@@ -58,6 +60,7 @@ KS_DECLARE(void) ks_ssl_init_ssl_locks(void)
is_init = 1;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
if (!skip_ssl) {
SSL_library_init();
SSL_load_error_strings();
@@ -81,6 +84,7 @@ KS_DECLARE(void) ks_ssl_init_ssl_locks(void)
ssl_count++;
}
+#endif
}
KS_DECLARE(void) ks_ssl_destroy_ssl_locks(void)
@@ -91,6 +95,7 @@ KS_DECLARE(void) ks_ssl_destroy_ssl_locks(void)
is_init = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
if (!skip_ssl) {
if (ssl_count == 1) {
CRYPTO_set_locking_callback(NULL);
@@ -111,6 +116,7 @@ KS_DECLARE(void) ks_ssl_destroy_ssl_locks(void)
ERR_free_strings();
EVP_cleanup();
}
+#endif
}
static int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int days);
@@ -159,6 +165,7 @@ KS_DECLARE(int) ks_gen_cert(const char *dir, const char *file)
}
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000
X509_free(x509);
EVP_PKEY_free(pkey);
@@ -169,6 +176,7 @@ KS_DECLARE(int) ks_gen_cert(const char *dir, const char *file)
//CRYPTO_mem_leaks(bio_err);
//BIO_free(bio_err);
+#endif
ks_safe_free(pvt);
@@ -231,8 +239,8 @@ static int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int days
X509_set_version(x, 0);
ASN1_INTEGER_set(X509_get_serialNumber(x), serial);
- X509_gmtime_adj(X509_get_notBefore(x), -(long)60*60*24*7);
- X509_gmtime_adj(X509_get_notAfter(x), (long)60*60*24*days);
+ X509_gmtime_adj(X509_getm_notBefore(x), -(long)60*60*24*7);
+ X509_gmtime_adj(X509_getm_notAfter(x), (long)60*60*24*days);
X509_set_pubkey(x, pk);
name = X509_get_subject_name(x);

View file

@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sofia-sip PKG_NAME:=sofia-sip
PKG_SOURCE_PROTO:=git PKG_VERSION:=1.13.3
PKG_SOURCE_URL:=https://github.com/freeswitch/sofia-sip.git
PKG_SOURCE_DATE=2020-08-31
PKG_SOURCE_VERSION:=f6f29b483e9c31ce8d3e87419ec3deea8679312d
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_MIRROR_HASH:=07b9b6198558542270699af2e31ff2331a49a5262e250cc78e3bf631dc444737
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
PKG_HASH:=6f9cc7ed674e2214809e390728da0df646f94e5b991cff9f393217176de9d7e4
# sofia-sip adds a version to include path # sofia-sip adds a version to include path
# need to update this when the version changes # need to update this when the version changes

View file

@ -11,10 +11,10 @@ PKG_NAME:=spandsp3
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/freeswitch/spandsp.git PKG_SOURCE_URL:=https://github.com/freeswitch/spandsp.git
PKG_SOURCE_DATE=2020-08-14 PKG_SOURCE_DATE=2020-10-19
PKG_SOURCE_VERSION:=6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6 PKG_SOURCE_VERSION:=e08c74db3f072db893c4d37de733f03c27bf7ed3
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_MIRROR_HASH:=fcfa13576a25ff27e3746c3db30de89d2afceb963072b352a34e7a4a9f492ae5 PKG_MIRROR_HASH:=4c2b29f71e130548a539cb86e47b34a5bda19896d96050868193e5aa86860db0
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1

View file

@ -9,14 +9,16 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sngrep PKG_NAME:=sngrep
PKG_VERSION:=1.4.8
PKG_RELEASE:=1
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net> PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_URL:=https://github.com/irontec/sngrep.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/irontec/sngrep/releases/download/v$(PKG_VERSION)
PKG_SOURCE_VERSION:=564ad9264ebe8b77ed18a923fef3643de920087c PKG_HASH:=f39fded8dc9ef0b7a41319f223dd4afa348bb2418bea578ed281557726829728
PKG_SOURCE_DATE=2019-12-02
PKG_RELEASE:=1 PKG_RELEASE:=1