kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
September 2020
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
12 participants
271 discussions
Start a n
N
ew thread
git:master:42228552: core: helper functions to search variants of str in another str
by Daniel-Constantin Mierla
03 Sep '20
03 Sep '20
Module: kamailio Branch: master Commit: 42228552b72267786561704f120e3da3aac5fd89 URL:
https://github.com/kamailio/kamailio/commit/42228552b72267786561704f120e3da…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-03T12:47:50+02:00 core: helper functions to search variants of str in another str --- Modified: src/core/tcp_read.c Modified: src/core/ut.c Modified: src/core/ut.h --- Diff:
https://github.
…
[View More]
com/kamailio/kamailio/commit/42228552b72267786561704f120e3da…
Patch:
https://github.com/kamailio/kamailio/commit/42228552b72267786561704f120e3da…
--- diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c index 655db7da7b..6a005a9a32 100644 --- a/src/core/tcp_read.c +++ b/src/core/tcp_read.c @@ -110,26 +110,6 @@ int tcp_set_clone_rcvbuf(int v) } #ifdef READ_HTTP11 -static inline char *strfindcasestrz(str *haystack, char *needlez) -{ - int i,j; - str needle; - - needle.s = needlez; - needle.len = strlen(needlez); - for(i=0;i<haystack->len-needle.len;i++) { - for(j=0;j<needle.len;j++) { - if ( !((haystack->s[i+j]==needle.s[j]) || - ( isalpha((int)haystack->s[i+j]) - && ((haystack->s[i+j])^(needle.s[j]))==0x20 )) ) - break; - } - if (j==needle.len) - return haystack->s+i; - } - return 0; -} - int tcp_http11_continue(struct tcp_connection *c) { struct dest_info dst; @@ -161,7 +141,7 @@ int tcp_http11_continue(struct tcp_connection *c) return 0; /* check for Expect header */ - if(strfindcasestrz(&msg, "Expect: 100-continue")!=NULL) + if(str_casesearch_strz(&msg, "Expect: 100-continue")!=NULL) { init_dst_from_rcv(&dst, &c->rcv); if (tcp_send(&dst, 0, HTTP11CONTINUE, HTTP11CONTINUE_LEN) < 0) { @@ -169,7 +149,7 @@ int tcp_http11_continue(struct tcp_connection *c) } } /* check for Transfer-Encoding header */ - if(strfindcasestrz(&msg, "Transfer-Encoding: chunked")!=NULL) + if(str_casesearch_strz(&msg, "Transfer-Encoding: chunked")!=NULL) { c->req.flags |= F_TCP_REQ_BCHUNKED; ret = 1; @@ -178,7 +158,7 @@ int tcp_http11_continue(struct tcp_connection *c) * - HTTP Via format is different that SIP Via * - workaround: replace with Hia to be ignored by SIP parser */ - if((p=strfindcasestrz(&msg, "\nVia:"))!=NULL) + if((p=str_casesearch_strz(&msg, "\nVia:"))!=NULL) { p++; *p = 'H'; diff --git a/src/core/ut.c b/src/core/ut.c index 90b01d1026..0189b642ab 100644 --- a/src/core/ut.c +++ b/src/core/ut.c @@ -296,6 +296,53 @@ char *str_search(str *text, str *needle) return NULL; } +/** + * @brief case insensitive search for occurence of needle in text + * @return pointer to start of needle in text or NULL if the needle + * is not found + */ +char *str_casesearch(str *text, str *needle) +{ + int i,j; + for(i=0;i<text->len-needle->len;i++) { + for(j=0;j<needle->len;j++) { + if ( !((text->s[i+j]==needle->s[j]) || + ( isalpha((int)text->s[i+j]) + && ((text->s[i+j])^(needle->s[j]))==0x20 )) ) + break; + } + if (j==needle->len) + return text->s+i; + } + return 0; +} + +/** + * portable strcasestr() - the libc version requires #define _GNU_SOURCE + */ +char *strz_casesearch_strz(char *textz, char *needlez) +{ + str text; + + text.s = textz; + text.len = strlen(textz); + + return str_casesearch_strz(&text, needlez); +} + +/** + * case insensitive search of a charz string 'needlez' inside str 'text' + */ +char *str_casesearch_strz(str *text, char *needlez) +{ + str needle; + + needle.s = needlez; + needle.len = strlen(needlez); + + return str_casesearch(text, &needle); +} + /* * ser_memmem() returns the location of the first occurrence of data * pattern b2 of size len2 in memory block b1 of size len1 or diff --git a/src/core/ut.h b/src/core/ut.h index 56c1f9e157..6ef2e079bc 100644 --- a/src/core/ut.h +++ b/src/core/ut.h @@ -1053,6 +1053,12 @@ char* get_abs_pathname(str* base, str* file); */ char *str_search(str *text, str *needle); +char *str_casesearch(str *text, str *needle); + +char *strz_casesearch_strz(char *textz, char *needlez); + +char *str_casesearch_strz(str *text, char *needlez); + /* * ser_memmem() returns the location of the first occurrence of data * pattern b2 of size len2 in memory block b1 of size len1 or
[View Less]
1
0
0
0
git:master:0a2fc037: Revert "tls: support compilation without deprecated OpenSSL APIs"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: master Commit: 0a2fc0371430f19f868dc17f3a361e412ceb376f URL:
https://github.com/kamailio/kamailio/commit/0a2fc0371430f19f868dc17f3a361e4…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:27:26+02:00 Revert "tls: support compilation without deprecated OpenSSL APIs" This reverts commit 234b02236b3ad13cdaf5624d11c727ad7d804747. --- Modified: src/modules/tls/
…
[View More]
tls_domain.c Modified: src/modules/tls/tls_init.c Modified: src/modules/tls/tls_locking.c --- Diff:
https://github.com/kamailio/kamailio/commit/0a2fc0371430f19f868dc17f3a361e4…
Patch:
https://github.com/kamailio/kamailio/commit/0a2fc0371430f19f868dc17f3a361e4…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index fc84033e68..a8859c4a31 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -27,8 +27,6 @@ #include <stdlib.h> #include <openssl/ssl.h> #include <openssl/opensslv.h> -#include <openssl/bn.h> -#include <openssl/dh.h> #ifndef OPENSSL_NO_ENGINE #include <openssl/engine.h> @@ -63,7 +61,7 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; - if (OpenSSL_version_num() < 0x1000005fL) { + if (SSLeay() < 0x1000005fL) { return; } diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 351ed4187e..b9288cbd9a 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -627,13 +627,14 @@ int tls_h_mod_pre_init_f(void) return 0; } LM_DBG("preparing tls env for modules initialization\n"); -#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) + LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); + OPENSSL_init_ssl(0, NULL); +#else LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n"); SSL_library_init(); - SSL_load_error_strings(); -#else - LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); #endif + SSL_load_error_strings(); tls_mod_preinitialized=1; return 0; } @@ -667,7 +668,7 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif - ssl_version=OpenSSL_version_num(); + ssl_version=SSLeay(); /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -679,7 +680,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - OpenSSL_version(OPENSSL_VERSION), ssl_version, + SSLeay_version(SSLEAY_VERSION), ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring " @@ -856,7 +857,6 @@ int tls_check_sockets(tls_domains_cfg_t* cfg) void tls_h_mod_destroy_f(void) { LM_DBG("tls module final tls destroy\n"); -#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) if(tls_mod_preinitialized > 0) ERR_free_strings(); /* TODO: free all the ctx'es */ @@ -869,5 +869,4 @@ void tls_h_mod_destroy_f(void) LM_DBG("executing openssl v1.1+ cleanup\n"); OPENSSL_cleanup(); #endif -#endif } diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 3eb6f033a5..4e5bbcc5e3 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,8 +140,6 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { -/* OpenSSL is thread-safe since 1.1.0 */ -#if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); if (n_static_locks<0){ @@ -169,10 +167,13 @@ int tls_init_locks() CRYPTO_set_locking_callback(locking_f); } +/* OpenSSL is thread-safe since 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* set "dynamic" locks callbacks */ CRYPTO_set_dynlock_create_callback(dyn_create_f); CRYPTO_set_dynlock_lock_callback(dyn_lock_f); CRYPTO_set_dynlock_destroy_callback(dyn_destroy_f); +#endif /* starting with v1.0.0 openssl does not use anymore getpid(), but address * of errno which can point to same virtual address in a multi-process @@ -185,7 +186,6 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ -#endif return 0; error:
[View Less]
1
0
0
0
git:master:bffd78f1: Revert "tls: added define condition on version functions"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: master Commit: bffd78f14921f67735a64caea2fb130393daa2bc URL:
https://github.com/kamailio/kamailio/commit/bffd78f14921f67735a64caea2fb130…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:27:24+02:00 Revert "tls: added define condition on version functions" This reverts commit 99c6a68dea60ca745dfdfa33085bb6acbcee846a. --- Modified: src/modules/tls/tls_domain.c
…
[View More]
Modified: src/modules/tls/tls_init.c --- Diff:
https://github.com/kamailio/kamailio/commit/bffd78f14921f67735a64caea2fb130…
Patch:
https://github.com/kamailio/kamailio/commit/bffd78f14921f67735a64caea2fb130…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index 2930bde2be..fc84033e68 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -63,11 +63,9 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; -#if OPENSSL_VERSION_NUMBER < 0x010100000L - if (SSLeay() < 0x1000005fL) { + if (OpenSSL_version_num() < 0x1000005fL) { return; } -#endif ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); SSL_CTX_set_options(ctx, SSL_OP_SINGLE_ECDH_USE); diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index f10d0c0344..351ed4187e 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -645,7 +645,6 @@ int tls_h_mod_init_f(void) { /*struct socket_info* si;*/ long ssl_version; - const char *ssl_version_txt; #if OPENSSL_VERSION_NUMBER < 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) int lib_kerberos; int lib_zlib; @@ -668,15 +667,7 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif - -#if OPENSSL_VERSION_NUMBER < 0x010100000L - ssl_version=SSLeay(); - ssl_version_txt=SSLeay_version(SSLEAY_VERSION); -#else ssl_version=OpenSSL_version_num(); - ssl_version_txt=OpenSSL_version(OPENSSL_VERSION); -#endif - /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -688,7 +679,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - ssl_version_txt, ssl_version, + OpenSSL_version(OPENSSL_VERSION), ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring "
[View Less]
1
0
0
0
git:master:da5d71da: Revert "tls: proper ifdef on libssl version for tls_init_locks()"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: master Commit: da5d71da620deb8b8740256e556011e93cdac1a3 URL:
https://github.com/kamailio/kamailio/commit/da5d71da620deb8b8740256e556011e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:27:18+02:00 Revert "tls: proper ifdef on libssl version for tls_init_locks()" This reverts commit 60bd3aa284a5d9eb117a9763aa590aecf276ba16. --- Modified: src/modules/tls/
…
[View More]
tls_locking.c --- Diff:
https://github.com/kamailio/kamailio/commit/da5d71da620deb8b8740256e556011e…
Patch:
https://github.com/kamailio/kamailio/commit/da5d71da620deb8b8740256e556011e…
--- diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 21078e82d9..3eb6f033a5 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,7 +140,7 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { -/* OpenSSL is no longer supporting to set locking callbacks since 1.1.0 */ +/* OpenSSL is thread-safe since 1.1.0 */ #if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); @@ -185,13 +185,10 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ +#endif return 0; error: tls_destroy_locks(); return -1; - -#else - return 0; -#endif }
[View Less]
1
0
0
0
git:5.4:0f6dea70: Revert "tls: support compilation without deprecated OpenSSL APIs"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: 5.4 Commit: 0f6dea703bd8a4cb5e450eddd046bce2b254e84d URL:
https://github.com/kamailio/kamailio/commit/0f6dea703bd8a4cb5e450eddd046bce…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:20:53+02:00 Revert "tls: support compilation without deprecated OpenSSL APIs" This reverts commit 10af8efa9061c2f52ee1db51c4cf665073c20dcc. --- Modified: src/modules/tls/tls_domain.
…
[View More]
c Modified: src/modules/tls/tls_init.c Modified: src/modules/tls/tls_locking.c --- Diff:
https://github.com/kamailio/kamailio/commit/0f6dea703bd8a4cb5e450eddd046bce…
Patch:
https://github.com/kamailio/kamailio/commit/0f6dea703bd8a4cb5e450eddd046bce…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index fc84033e68..a8859c4a31 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -27,8 +27,6 @@ #include <stdlib.h> #include <openssl/ssl.h> #include <openssl/opensslv.h> -#include <openssl/bn.h> -#include <openssl/dh.h> #ifndef OPENSSL_NO_ENGINE #include <openssl/engine.h> @@ -63,7 +61,7 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; - if (OpenSSL_version_num() < 0x1000005fL) { + if (SSLeay() < 0x1000005fL) { return; } diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 351ed4187e..b9288cbd9a 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -627,13 +627,14 @@ int tls_h_mod_pre_init_f(void) return 0; } LM_DBG("preparing tls env for modules initialization\n"); -#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) + LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); + OPENSSL_init_ssl(0, NULL); +#else LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n"); SSL_library_init(); - SSL_load_error_strings(); -#else - LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); #endif + SSL_load_error_strings(); tls_mod_preinitialized=1; return 0; } @@ -667,7 +668,7 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif - ssl_version=OpenSSL_version_num(); + ssl_version=SSLeay(); /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -679,7 +680,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - OpenSSL_version(OPENSSL_VERSION), ssl_version, + SSLeay_version(SSLEAY_VERSION), ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring " @@ -856,7 +857,6 @@ int tls_check_sockets(tls_domains_cfg_t* cfg) void tls_h_mod_destroy_f(void) { LM_DBG("tls module final tls destroy\n"); -#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) if(tls_mod_preinitialized > 0) ERR_free_strings(); /* TODO: free all the ctx'es */ @@ -869,5 +869,4 @@ void tls_h_mod_destroy_f(void) LM_DBG("executing openssl v1.1+ cleanup\n"); OPENSSL_cleanup(); #endif -#endif } diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 3eb6f033a5..4e5bbcc5e3 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,8 +140,6 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { -/* OpenSSL is thread-safe since 1.1.0 */ -#if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); if (n_static_locks<0){ @@ -169,10 +167,13 @@ int tls_init_locks() CRYPTO_set_locking_callback(locking_f); } +/* OpenSSL is thread-safe since 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* set "dynamic" locks callbacks */ CRYPTO_set_dynlock_create_callback(dyn_create_f); CRYPTO_set_dynlock_lock_callback(dyn_lock_f); CRYPTO_set_dynlock_destroy_callback(dyn_destroy_f); +#endif /* starting with v1.0.0 openssl does not use anymore getpid(), but address * of errno which can point to same virtual address in a multi-process @@ -185,7 +186,6 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ -#endif return 0; error:
[View Less]
1
0
0
0
git:5.4:e7cf0625: Revert "tls: added define condition on version functions"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: 5.4 Commit: e7cf0625893125bb45029f6e055ec7910f70d88f URL:
https://github.com/kamailio/kamailio/commit/e7cf0625893125bb45029f6e055ec79…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:20:53+02:00 Revert "tls: added define condition on version functions" This reverts commit 67979e07b63b574687b1924c38fabd724d0ad876. --- Modified: src/modules/tls/tls_domain.c
…
[View More]
Modified: src/modules/tls/tls_init.c --- Diff:
https://github.com/kamailio/kamailio/commit/e7cf0625893125bb45029f6e055ec79…
Patch:
https://github.com/kamailio/kamailio/commit/e7cf0625893125bb45029f6e055ec79…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index 2930bde2be..fc84033e68 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -63,11 +63,9 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; -#if OPENSSL_VERSION_NUMBER < 0x010100000L - if (SSLeay() < 0x1000005fL) { + if (OpenSSL_version_num() < 0x1000005fL) { return; } -#endif ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); SSL_CTX_set_options(ctx, SSL_OP_SINGLE_ECDH_USE); diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index f10d0c0344..351ed4187e 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -645,7 +645,6 @@ int tls_h_mod_init_f(void) { /*struct socket_info* si;*/ long ssl_version; - const char *ssl_version_txt; #if OPENSSL_VERSION_NUMBER < 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) int lib_kerberos; int lib_zlib; @@ -668,15 +667,7 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif - -#if OPENSSL_VERSION_NUMBER < 0x010100000L - ssl_version=SSLeay(); - ssl_version_txt=SSLeay_version(SSLEAY_VERSION); -#else ssl_version=OpenSSL_version_num(); - ssl_version_txt=OpenSSL_version(OPENSSL_VERSION); -#endif - /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -688,7 +679,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - ssl_version_txt, ssl_version, + OpenSSL_version(OPENSSL_VERSION), ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring "
[View Less]
1
0
0
0
git:5.4:abebfbed: Revert "tls: proper ifdef on libssl version for tls_init_locks()"
by Victor Seva
02 Sep '20
02 Sep '20
Module: kamailio Branch: 5.4 Commit: abebfbed313aaf052f4383ecf03607f17549c63c URL:
https://github.com/kamailio/kamailio/commit/abebfbed313aaf052f4383ecf03607f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-02T14:20:52+02:00 Revert "tls: proper ifdef on libssl version for tls_init_locks()" This reverts commit e9baba91c6c7e3d1817e8a07bbabbce3a8efbe79. --- Modified: src/modules/tls/tls_locking.
…
[View More]
c --- Diff:
https://github.com/kamailio/kamailio/commit/abebfbed313aaf052f4383ecf03607f…
Patch:
https://github.com/kamailio/kamailio/commit/abebfbed313aaf052f4383ecf03607f…
--- diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 21078e82d9..3eb6f033a5 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,7 +140,7 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { -/* OpenSSL is no longer supporting to set locking callbacks since 1.1.0 */ +/* OpenSSL is thread-safe since 1.1.0 */ #if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); @@ -185,13 +185,10 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ +#endif return 0; error: tls_destroy_locks(); return -1; - -#else - return 0; -#endif }
[View Less]
1
0
0
0
[kamailio/kamailio] [db_text] In a case of using dispatcher from db_text, only first entry in table is processed (#2465)
by Igor Olhovskiy
02 Sep '20
02 Sep '20
### Description I have list of dispatchers in `db_text`. But only first is processed. #### Reproduction Create `dispatcher` table in a case of db_text ``` id(int,auto) setid(int) destination(string) flags(int) priority(int) attrs(string) description(string) 2:1:sip\:asterisk_2\:5060:2:0::asterisk_2 1:1:sip\:asterisk_1\:5060:2:0::asterisk_1 ``` Start Kamailio Run `kamctl dispatcher dump` ``` # kamctl dispatcher dump { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{
…
[View More]
"SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:asterisk_2:5060", "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 124 } ``` Only the first entry is processed. On running ``` # kamctl dispatcher reload ``` nothing is changed. ### Possible Solutions Adding other dispatchers via `kamcmd` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` /# kamailio -v version: kamailio 5.4.1 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled with gcc 8.3.0 ``` * **Operating System**: Debian 10/Docker. ``` # uname -a Linux 9b7efa852274 5.3.18-lp152.36-default #1 SMP Tue Aug 18 17:09:44 UTC 2020 (885251f) x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2465
[View Less]
3
8
0
0
[kamailio/kamailio] [kamdbctl] db_text incorrect version table in 5.4 (#2463)
by Igor Olhovskiy
02 Sep '20
02 Sep '20
### Description `Version` table in default `db_text` creation has incorrect structure. ### Troubleshooting version table is #### Reproduction Installing Kamailio 5.4 from Debian repos. Tuning **kamdbctl** to DBTEXT. Running `kamdbctl create` Check `version` table. Shows something like ``` id(int,auto) table_name(string) table_version(int) version:1 ... ``` Should be ``` table_name(string) table_version(int) version:1 ``` or with `id` index ### Possible Solutions Manually delete `id(
…
[View More]
int,auto)` from `version` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` /# kamailio -v version: kamailio 5.4.1 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled with gcc 8.3.0 ``` * **Operating System**: Debian 10/Docker image ``` # uname -a Linux 9b7efa852274 5.3.18-lp152.36-default #1 SMP Tue Aug 18 17:09:44 UTC 2020 (885251f) x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2463
[View Less]
2
2
0
0
git:5.4:acebbeef: kamctl: regenerated dbtext version table records
by Daniel-Constantin Mierla
02 Sep '20
02 Sep '20
Module: kamailio Branch: 5.4 Commit: acebbeef29d538c245e58738574bb5432c4170f6 URL:
https://github.com/kamailio/kamailio/commit/acebbeef29d538c245e58738574bb54…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-02T13:15:17+02:00 kamctl: regenerated dbtext version table records - GH #2463 (cherry picked from commit 65f5d0ed0fb88f5312ac53f2faaa66a2098ce0d8) --- Modified: utils/kamctl/dbtext/kamailio/
…
[View More]
version --- Diff:
https://github.com/kamailio/kamailio/commit/acebbeef29d538c245e58738574bb54…
Patch:
https://github.com/kamailio/kamailio/commit/acebbeef29d538c245e58738574bb54…
--- diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version index a733827f18..a9d31882d9 100644 --- a/utils/kamctl/dbtext/kamailio/version +++ b/utils/kamctl/dbtext/kamailio/version @@ -1,72 +1,72 @@ id(int,auto) table_name(string) table_version(int) -version:1 -acc:5 -acc_cdrs:2 -active_watchers:12 -address:6 -aliases:8 -carrier_name:1 -carrierfailureroute:2 -carrierroute:3 -cpl:1 -dbaliases:1 -dialog:7 -dialog_vars:1 -dialplan:2 -dispatcher:4 -domain:2 -domain_attrs:1 -domain_name:1 -domainpolicy:2 -dr_gateways:3 -dr_groups:2 -dr_gw_lists:1 -dr_rules:3 -globalblacklist:1 -grp:2 -htable:2 -imc_members:1 -imc_rooms:1 -lcr_gw:3 -lcr_rule:3 -lcr_rule_target:1 -location:9 -location_attrs:1 -matrix:1 -missed_calls:4 -mohqcalls:1 -mohqueues:1 -mtree:1 -mtrees:2 -pdt:1 -pl_pipes:1 -presentity:5 -pua:7 -purplemap:1 -re_grp:1 -rls_presentity:1 -rls_watchers:3 -rtpengine:1 -rtpproxy:1 -sca_subscriptions:2 -secfilter:1 -silo:8 -sip_trace:4 -speed_dial:2 -subscriber:7 -topos_d:1 -topos_t:1 -trusted:6 -uacreg:4 -uid_credentials:7 -uid_domain:2 -uid_domain_attrs:1 -uid_global_attrs:1 -uid_uri:3 -uid_uri_attrs:2 -uid_user_attrs:3 -uri:1 -userblacklist:1 -usr_preferences:2 -watchers:3 -xcap:4 +0:version:1 +0:acc:5 +0:acc_cdrs:2 +0:active_watchers:12 +0:address:6 +0:aliases:8 +0:carrier_name:1 +0:carrierfailureroute:2 +0:carrierroute:3 +0:cpl:1 +0:dbaliases:1 +0:dialog:7 +0:dialog_vars:1 +0:dialplan:2 +0:dispatcher:4 +0:domain:2 +0:domain_attrs:1 +0:domain_name:1 +0:domainpolicy:2 +0:dr_gateways:3 +0:dr_groups:2 +0:dr_gw_lists:1 +0:dr_rules:3 +0:globalblacklist:1 +0:grp:2 +0:htable:2 +0:imc_members:1 +0:imc_rooms:1 +0:lcr_gw:3 +0:lcr_rule:3 +0:lcr_rule_target:1 +0:location:9 +0:location_attrs:1 +0:matrix:1 +0:missed_calls:4 +0:mohqcalls:1 +0:mohqueues:1 +0:mtree:1 +0:mtrees:2 +0:pdt:1 +0:pl_pipes:1 +0:presentity:5 +0:pua:7 +0:purplemap:1 +0:re_grp:1 +0:rls_presentity:1 +0:rls_watchers:3 +0:rtpengine:1 +0:rtpproxy:1 +0:sca_subscriptions:2 +0:secfilter:1 +0:silo:8 +0:sip_trace:4 +0:speed_dial:2 +0:subscriber:7 +0:topos_d:1 +0:topos_t:1 +0:trusted:6 +0:uacreg:4 +0:uid_credentials:7 +0:uid_domain:2 +0:uid_domain_attrs:1 +0:uid_global_attrs:1 +0:uid_uri:3 +0:uid_uri_attrs:2 +0:uid_user_attrs:3 +0:uri:1 +0:userblacklist:1 +0:usr_preferences:2 +0:watchers:3 +0:xcap:4
[View Less]
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200