I am trying to get some detailed understanding on the TLS code in Kamailio, but have a problem finding the code used to connect to other servers over TLS. There is some documentation saying that the server part is a bit weird, since we get into the routing script, having accepted a message, before we can evaluate certificates. I agree with that documentation, but it kind of works so far.
I can't find a way to verify the certificate of the server I connect to as a client *BEFORE* I send any message. Anyone that can comment or point me to the right file?
Thanks, /O