Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Daniel-Constantin Mierla
The parameters for functions are resolved at fixup time, which is done after mod_init -- the config parser will see any function parameter as just string, then later will run fixup for function parameters. Probably the error message from tls_select.c:152 can be made dbg, the pv value is ok, be

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Note that there should be direct pv alternative, as I could see in the > module, such as $tls_peer_subject_cn -- see tls_pv structure inside > tls_select.c file of the tls module. Not sure if they were documented > somewhere. those seem to work without modify

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Daniel-Constantin Mierla
It might be the way tls module exports the selects -- I see it does it in modinit, which is executed after the config is parsed. Can you move the line: register_select_table(tls_sel); from mod_init() to mod_register() in tls_mod.c and try again? If all works ok with your tests, then you can c

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > the $sel(...) should work, I wonder if selects can add themselves > dynamically at runtime, so 'peer' is only when a tls connection is > established. Can you try with other selects pointing to own certificate, > iirc should be like: $sel(tls.my.subject.cn)? i

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Daniel-Constantin Mierla
Hello, the $sel(...) should work, I wonder if selects can add themselves dynamically at runtime, so 'peer' is only when a tls connection is established. Can you try with other selects pointing to own certificate, iirc should be like: $sel(tls.my.subject.cn)? Cheers, Daniel On 10/04/14 09:08

[SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
i have these two lines in config: $var(common_name) = @tls.peer.subject.cn; $var(common_name) = $sel(tls.peer.subject.cn); the latter gives error at startup: 0(24214) ERROR: [select.c:316]: resolve_select(): Unable to resolve select 'tls' at level 0 0(24214) ERROR: [select.c