To use TLS you need first OpenSSL installed. Then you need to re-make ser_ims with the following command:
cd /opt/OpenIMSCore/ make all include_modules=tls
Base on how you have compiled OpenSSL, you might need to add some extra parameters to the make above, like:
make all include_modules=tls TLS_EXTRA_LIBS="-lz -lkrb5"
Then you need find some certificates for your P-CSCF. The easiest way to do this is to run once the /opt/OpenIMSCore/ser_ims/cfg/tls_prepare.sh. This creates all the files that you need. You will be asked twice for the same information. Make sure that you enter the same organization, group, common-name! If you need to put your own certificates look inside that script and in the /opt/OpenIMSCore/ser_ims/modules/tls/README for more detailed information.
Edit the pcscf.cfg. There are a few lines that you need to uncomment/comment. Here are some that you need (please check carefully the file for any other lines that do not appear in this FAQ, as the information here might be deprecated):
listen=tls:127.0.0.1
tls_port_no=4061
enable_tls=yes
...
modparam("pcscf","use_tls",1)
modparam("pcscf","tls_port",4061)
...
loadmodule "/opt/OpenIMSCore/ser_ims/modules/tls/tls.so"
modparam("tls", "tls_method", "TLSv1")
modparam("tls", "private_key", "/opt/OpenIMSCore/PCSCF_CA/pcscf_private_key.pem")
modparam("tls", "certificate", "/opt/OpenIMSCore/PCSCF_CA/pcscf_cert.pem")
modparam("tls", "ca_list", "/opt/OpenIMSCore/PCSCF_CA/pcscf_ca_list.pem")
modparam("tls", "verify_certificate", 1)
modparam("tls", "require_certificate", 0)
modparam("tls", "tls_disable_compression", 1)
After this, you should be ready. In case that you ask yourself why we haven't enabled the TLS by default, please consider that a lot of people do not need TLS at all and would prefer to stay away from installing OpenSSL and generating certificates that will never be used.