[SR-Users] tls.so: mod_register failed on fedora 18 x86_64

Roberto Fichera kernel at tekno-soft.it
Tue Aug 20 16:24:54 CEST 2013


On 08/19/2013 03:34 PM, Roberto Fichera wrote:
> On 08/19/2013 12:37 PM, Daniel-Constantin Mierla wrote:
>
> Hi Daniel,
>
>> Does it work with tls.so as first loaded module?
>>
>> If not, can you send the logs messages with debug=3?
>>
>> Cheers,
>> Daniel
>>
>> On 8/19/13 12:26 PM, Roberto Fichera wrote:
>>> On 08/19/2013 12:14 PM, Daniel-Constantin Mierla wrote:
>>>> Hello,
>>>
>>> Hi,
>>>
>>>> what version of libssl is installed?
>>>
>>> [root at proxy CA]# rpm -q -a openssl-libs
>>> openssl-libs-1.0.1e-4.fc18.x86_64
>>> [root at proxy CA]#
>
> Mmmhhh!!! Looks like this particular version has problem, see:
>
> http://bugs.python.org/msg191610

I can confirm that the bug is present in both Fedora 18 & 19. The openssl has a bug
which prevent the tls module to work due to allow_customize = 0 set in one of the
functions called by OPENSSL_init() within CRYPTO_set_mem_functions().

You can check easily with this small code:

#include <stdio.h>
#include <openssl/ssl.h>

static void *myMalloc( size_t s ) { return NULL; }   
static void *myRealloc( void *p, size_t s ) { return NULL; }
static void myFree( void *p ) {}

int main()
{
  if ( !CRYPTO_set_mem_functions( myMalloc, myRealloc, myFree) )
  {
    fprintf( stderr, "Unable to set the memory allocation functions\n");
    return -1;
  }

  return 0;
}

compile with "gcc -o testssl testssl.c -lssl -lcrypto"

I've done a small patch in order to workaround the problem in case someone need it.

>
>>>
>>>>
>>>> can you list what modules are loaded in your kamailio.cfg? Try with tls.so loaded as first module...
>>>
>>> Sure!
>>>
>>> #!define WITH_PGSQL
>>> #!define WITH_AUTH
>>> #!define WITH_NAT
>>> #!define WITH_TLS
>>> #!define WITH_ANTIFLOOD
>>> #!define WITH_ACCDB
>>> #!define WITH_DIALPLAN
>>>
>>> .....
>>>
>>> # set paths to location of modules (to sources or installation folders)
>>> #!ifdef WITH_SRCPATH
>>> mpath="modules_k:modules"
>>> #!else
>>> mpath="/usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/"
>>> #!endif
>>>
>>> #!ifdef WITH_TLS
>>> loadmodule "tls.so"
>>> #!endif
>>>
>>> #!ifdef WITH_MYSQL
>>> loadmodule "db_mysql.so"
>>> #!endif
>>>
>>> #!ifdef WITH_PGSQL
>>> loadmodule "db_postgres.so"
>>> #!endif
>>>
>>> loadmodule "mi_fifo.so"
>>> loadmodule "kex.so"
>>> loadmodule "corex.so"
>>> loadmodule "tm.so"
>>> loadmodule "tmx.so"
>>> loadmodule "sl.so"
>>> loadmodule "rr.so"
>>> loadmodule "pv.so"
>>> loadmodule "maxfwd.so"
>>> loadmodule "usrloc.so"
>>> loadmodule "registrar.so"
>>> loadmodule "textops.so"
>>> loadmodule "siputils.so"
>>> loadmodule "xlog.so"
>>> loadmodule "sanity.so"
>>> loadmodule "ctl.so"
>>> loadmodule "cfg_rpc.so"
>>> loadmodule "mi_rpc.so"
>>> loadmodule "acc.so"
>>> loadmodule "avpops.so"
>>>
>>> #!ifdef WITH_AUTH
>>> loadmodule "auth.so"
>>> loadmodule "auth_db.so"
>>> #!ifdef WITH_IPAUTH
>>> loadmodule "permissions.so"
>>> #!endif
>>> #!endif
>>>
>>> #!ifdef WITH_ALIASDB
>>> loadmodule "alias_db.so"
>>> #!endif
>>>
>>> #!ifdef WITH_SPEEDDIAL
>>> loadmodule "speeddial.so"
>>> #!endif
>>>
>>> #!ifdef WITH_DIALPLAN
>>> loadmodule "dialplan.so"
>>> #!endif
>>>
>>> #!ifdef WITH_MULTIDOMAIN
>>> loadmodule "domain.so"
>>> #!endif
>>>
>>> #!ifdef WITH_PRESENCE
>>> loadmodule "presence.so"
>>> loadmodule "presence_xml.so"
>>> #!endif
>>>
>>> #!ifdef WITH_NAT
>>> loadmodule "nathelper.so"
>>> loadmodule "rtpproxy.so"
>>> #!endif
>>>
>>> #!ifdef WITH_ANTIFLOOD
>>> loadmodule "htable.so"
>>> loadmodule "pike.so"
>>> #!endif
>>>
>>> #!ifdef WITH_XMLRPC
>>> loadmodule "xmlrpc.so"
>>> #!endif
>>>
>>> #!ifdef WITH_DEBUG
>>> loadmodule "debugger.so"
>>> #!endif
>>>
>>> Cheers,
>>> Roberto Fichera.
>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 8/19/13 11:47 AM, Roberto Fichera wrote:
>>>>> Hi All,
>>>>>
>>>>> I'm just trying to setup the TLS on the last Kamailio v4.0.3 on Fedora 18 64bits. Kamailio
>>>>> doesn't start and terminate with the error below:
>>>>>
>>>>> loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/
>>>>>   0(1676) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions
>>>>>   0(1676) ERROR: <core> [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so:
>>>>> mod_register failed
>>>>>   0(1676) : <core> [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 279,
>>>>> column
>>>>> 12-19: failed to load module
>>>>>   0(1676) ERROR: <core> [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching <tls> found
>>>>>   0(1676) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 439,
>>>>> column
>>>>> 51: Can't set module parameter
>>>>>   0(1676) ERROR: <core> [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching <tls> found
>>>>>   0(1676) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 440,
>>>>> column
>>>>> 97: Can't set module parameter
>>>>>   0(1676) ERROR: <core> [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching <tls> found
>>>>>   0(1676) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 441,
>>>>> column
>>>>> 92: Can't set module parameter
>>>>>   0(1676) ERROR: <core> [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching <tls> found
>>>>>   0(1676) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 442,
>>>>> column
>>>>> 64: Can't set module parameter
>>>>> ERROR: bad config file (5 errors)
>>>>>
>>>>> Cheers,
>>>>> Roberto Fichera.
>>>>>
>>>>> _______________________________________________
>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>>> sr-users at lists.sip-router.org
>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> -- 
>> Daniel-Constantin Mierla - http://www.asipto.com
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130820/1e1c9904/attachment.html>


More information about the sr-users mailing list