Module: sip-router
Branch: kamailio_3.0
Commit: aff7ce53ed0dc9a63143f45fa546b7e2640f82b1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=aff7ce5…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Feb 23 16:10:21 2010 +0100
tls: disable kerberos more thoroughly [fix]
Older openssl versions (< 0.9.8e release) have a bug in the
kerberos code (it uses the wrong malloc, for more details see
openssl bug # 1467). While there is already a workaround for this
openssl bug in the sr code (see commits 36cb8f & 560a42), in some
situations this workaround causes another bug (crash on connection
opening when openssl is compiled with kerberos support and
kerberos is enabled for key exchange).
The current fix will disable automatically all the ciphers containing
KRB5 if the openssl version is < 0.9.8e beta1 or it is between
0.9.9-dev and 0.9.9-beta1.
It iss equivalent to setting cipher_list to "<prev. value>:!KRB5".
Impact: this fix is needed only if openssl is compiled with
kerberos support and the version is < 0.9.8e. It also affects at
least CentOS users with openssl-0.9.8e-12.el5_4.1 (in the centos
openssl package they play some strange games with the version and
report 0.9.8b via SSLeay).
Tested-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Andreas Rehbein rehbein at e-technik.org
Reported-by: Martin Koenig koenig starface.de
(cherry picked from commit 51ee5da9ebf09447f71d4393f7c5b703305ff46d)
---
modules/tls/tls_domain.c | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/modules/tls/tls_domain.c b/modules/tls/tls_domain.c
index db35eda..628b3e2 100644
--- a/modules/tls/tls_domain.c
+++ b/modules/tls/tls_domain.c
@@ -269,6 +269,10 @@ static int load_ca_list(tls_domain_t* d)
return 0;
}
+#define C_DEF_NO_KRB5 "DEFAULT:!KRB5"
+#define C_DEF_NO_KRB5_LEN (sizeof(C_DEF_NO_KRB5)-1)
+#define C_NO_KRB5_SUFFIX ":!KRB5"
+#define C_NO_KRB5_SUFFIX_LEN (sizeof(C_NO_KRB5_SUFFIX)-1)
/*
* Configure cipher list
@@ -277,12 +281,35 @@ static int set_cipher_list(tls_domain_t* d)
{
int i;
int procs_no;
-
- if (!d->cipher_list.s) return 0;
+ char* cipher_list;
+
+ cipher_list=d->cipher_list.s;
+#ifdef TLS_KSSL_WORKARROUND
+ if (openssl_kssl_malloc_bug) { /* is openssl bug #1467 present ? */
+ if (d->cipher_list.s==0) {
+ /* use "DEFAULT:!KRB5" */
+ cipher_list="DEFAULT:!KRB5";
+ } else {
+ /* append ":!KRB5" */
+ cipher_list=shm_malloc(d->cipher_list.len+C_NO_KRB5_SUFFIX_LEN+1);
+ if (cipher_list) {
+ memcpy(cipher_list, d->cipher_list.s, d->cipher_list.len);
+ memcpy(cipher_list+d->cipher_list.len, C_NO_KRB5_SUFFIX,
+ C_NO_KRB5_SUFFIX_LEN);
+ cipher_list[d->cipher_list.len+C_NO_KRB5_SUFFIX_LEN]=0;
+ shm_free(d->cipher_list.s);
+ d->cipher_list.s=cipher_list;
+ d->cipher_list.len+=C_NO_KRB5_SUFFIX_LEN;
+ }
+ }
+ }
+#endif /* TLS_KSSL_WORKARROUND */
+ if (!cipher_list) return 0;
procs_no=get_max_procs();
for(i = 0; i < procs_no; i++) {
- if (SSL_CTX_set_cipher_list(d->ctx[i], d->cipher_list.s) == 0 ) {
- ERR("%s: Failure to set SSL context cipher list\n", tls_domain_str(d));
+ if (SSL_CTX_set_cipher_list(d->ctx[i], cipher_list) == 0 ) {
+ ERR("%s: Failure to set SSL context cipher list \"%s\"\n",
+ tls_domain_str(d), cipher_list);
return -1;
}
}
Hi Marius,
since you did some updates to this module, I am opening for debate some
needed enhancements I did during 3.0 testing phase and want to get
opinions how to get in the code repo.
Practically is a new module I named for now ratelimit2 and my last idea
is to get it named pipelimit in the trunk.
The reason for a new module are some major changes. The module uses the
same algorithm but its core is overhaul.
- definitions of pipes are loaded from database
- there can be unlimited number of pipes
- pipes are identified by string names
- should be possible to reload pipes at runtime (iirc, not yet in)
- new pipes can be added at runtime
- functions accept variables to identify the pipe
Since I never used queues from this module and haven't spent time to
understand the concept behind, this functionality is completely missing.
The old module might be good to keep in place, probably many people are
using it in this form. So, proposals? What is the way to go on? Common
code (algorithms) can be made lib at some point.
Cheers,
Daniel
--
Daniel-Constantin Mierla
* http://www.asipto.com/
Hello,
a reminder for developers to write a short note for each new feature
either to NEWS file in source tree or to wiki page:
http://sip-router.org/wiki/features/new-in-devel
Makes life much easier when the next major release is going to happen
and help people to spot quickly what new features are already available
in devel branch, hopefully attracting some of them to go for it and test.
Now the wiki page is updated with most of NEWS content for 3.1.
Thanks,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
Hello,
I am going to visit CeBIT 2010 in Hannover next week. Drop me an email
if you are around and want to meet and chat about Kamailio, SIP Router
projects, etc.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
Hi, I'm dealing with presence right now. I've read full OMA and RCS
specifications/proposals/guidelines for presence and XCAP but I don't feel
comfortable with some parts of them.
So let me to explain the question (it involves the sr/kamailio presence module
behavior for a future re-design in which I want to participate):
In presence/XCAP/XDM there are three ways bob can deny alice to see his
presence status (by modifying the XCAP documents according):
1) Ignore alice's request. This is, bob doesn't "allow" neither "blocks"
alice, so alice just gets the first NOTIFY from the server with:
Subscription-Status: pending
After some long time the server will send:
Subscription-Status: terminated ; reason=expired
2) Block alice by invoking a "block" action. This means that alice receives a
NOTIFY from the server with:
Subscription-Status: terminated; reason=rejected
This is: alice *knows* that she has been explicitely blocked by bob.
3) Polite-block alice by invoking "polite-block" action. In this way the
presence server generates a spoofed NOTIFY for alice containing "offline"
information but the header:
Subscription-Status: active
This is: alice *things* she has been allowed by bob and bob it's offline right
now (not true).
Well, in real IM/presence world (MSN, Skype, XMPP, Yahoo...) option 2 doesn't
exist, am I right? This is, if you block an user he doesn't know that you have
blocked him. Instead just options 1 or 3 are used (and in some networks just
option 1).
Do you see any advantage in point 2? Personally I don't see it and it just
introduces too much complexity for presence/XCAP/XDM client developers.
I would appreciate your opinnions about it.
Thanks.
--
Iñaki Baz Castillo <ibc(a)aliax.net>
Module: sip-router
Branch: master
Commit: 2372a7d5039a72f9cdb6b8bb7acb8a5ae2cb5c5f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2372a7d…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Feb 24 17:04:54 2010 +0100
userblacklist(k): short term fix in the docs for redundant table definition
---
modules_k/userblacklist/README | 12 +++++++-----
modules_k/userblacklist/doc/userblacklist_db.xml | 4 +++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/modules_k/userblacklist/README b/modules_k/userblacklist/README
index 3d7927a..5e0c242 100644
--- a/modules_k/userblacklist/README
+++ b/modules_k/userblacklist/README
@@ -187,7 +187,7 @@ modparam("userblacklist", "use_domain", 0)
4.3. check_blacklist (string table)
-4.1. check_user_blacklist (string user, string domain, string number, string
+4.1. check_user_blacklist (string user, string domain, string number, string
table)
Finds the longest prefix that matches the request URI user (or the
@@ -208,7 +208,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)"))
}
...
-4.2. check_user_whitelist (string user, string domain, string number, string
+4.2. check_user_whitelist (string user, string domain, string number, string
table)
Finds the longest prefix that matches the request URI user (or the
@@ -229,7 +229,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)"))
}
...
-4.3. check_blacklist (string table)
+4.3. check_blacklist (string table)
Finds the longest prefix that matches the request URI for the given
table. If a match is found and it is not set to whitelist, false is
@@ -247,7 +247,7 @@ if (!check_blacklist("global_blacklist")))
5.1. reload_blacklist
-5.1. reload_blacklist
+5.1. reload_blacklist
Reload the internal global blacklist cache. This is necessary after the
database tables for the global blacklist have been changed.
@@ -399,7 +399,9 @@ modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
8. globalblacklist_table (String)
- Name of the globalblacklist table for the userblacklist module.
+ Name of the globalblacklist table for the userblacklist module. Please
+ not that this table is currently ignored, the table needs to be given
+ as a parameter for the check_blacklist function.
Default value is "globalblacklist".
diff --git a/modules_k/userblacklist/doc/userblacklist_db.xml b/modules_k/userblacklist/doc/userblacklist_db.xml
index f4d2585..5e8df9c 100644
--- a/modules_k/userblacklist/doc/userblacklist_db.xml
+++ b/modules_k/userblacklist/doc/userblacklist_db.xml
@@ -111,7 +111,9 @@ modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
</section>
<section>
<title><varname>globalblacklist_table</varname> (String)</title>
- <para>Name of the globalblacklist table for the userblacklist module.</para>
+ <para>Name of the globalblacklist table for the userblacklist module.
+ Please not that this table is currently ignored, the table needs to be
+ given as a parameter for the check_blacklist function.</para>
<para>
<emphasis>Default value is <quote>globalblacklist</quote>.</emphasis>
</para>