<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Please help me when you get a chance.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I&#8217;ve follow the instruction link below to configure TLS in my freeswitch server, but it failed with my FSClient 1.2.3.5. I copied cafile.pem from my freeswitch to my windows desktop and gived the right directory under &#8220;TLS Certificate Directory&#8221; shown as below screenshot (also attached). <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><a href="https://freeswitch.org/confluence/display/FREESWITCH/SIP+TLS">https://freeswitch.org/confluence/display/FREESWITCH/SIP+TLS</a><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>But I still cannot log in with tls, console log output, and configuration files are below. Kindly take a look and let me know if additional info is needed.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>P.S. I used IP instead of domain name to create the certificate, is it a problem? E.g: I used ./gentls_cert setup -cn pbx.freeswitch.org -alt DNS: 52.35.22.204 -org 52.35.22.204.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><img border=0 width=362 height=326 style='width:3.7708in;height:3.3958in' id="Picture_x0020_2" src="cid:image003.png@01D248AF.51357420"><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><b>Console output:<o:p></o:p></b></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>tport.c:2749 tport_wakeup_pri() tport_wakeup_pri(0x7fcee8050770): events IN<o:p></o:p></p><p class=MsoNormal>tport.c:862 tport_alloc_secondary() tport_alloc_secondary(0x7fcee8050770): new secondary tport 0x7fcee8252ea0<o:p></o:p></p><p class=MsoNormal>tport_type_tcp.c:203 tport_tcp_init_secondary() tport_tcp_init_secondary(0x7fcee8252ea0): Setting TCP_KEEPIDLE to 30<o:p></o:p></p><p class=MsoNormal>tport_type_tcp.c:209 tport_tcp_init_secondary() tport_tcp_init_secondary(0x7fcee8252ea0): Setting TCP_KEEPINTVL to 30<o:p></o:p></p><p class=MsoNormal>tport_type_tls.c:610 tport_tls_accept() tport_tls_accept(0x7fcee8252ea0): new connection from tls/50.187.205.251:56612/sips<o:p></o:p></p><p class=MsoNormal><span style='background:yellow;mso-highlight:yellow'>tport_tls.c:955 tls_connect() tls_connect(0x7fcee8252ea0): events NEGOTIATING</span><o:p></o:p></p><p class=MsoNormal><span style='background:yellow;mso-highlight:yellow'>tport_tls.c:1044 tls_connect() tls_connect(0x7fcee8252ea0): TLS setup failed (error:00000001:lib(0):func(0):reason(1))</span><o:p></o:p></p><p class=MsoNormal>tport.c:2090 tport_close() tport_close(0x7fcee8252ea0): tls/50.187.205.251:56612/sips<o:p></o:p></p><p class=MsoNormal>tport.c:2263 tport_set_secondary_timer() tport(0x7fcee8252ea0): set timer at 0 ms because zap<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>freeswitch@ip-172-31-28-201&gt; sofia status<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State<o:p></o:p></p><p class=MsoNormal>=================================================================================================<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; external-ipv6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@[::1]:5080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0)<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 172.31.28.201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALIASED<o:p></o:p></p><p class=MsoNormal>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;external&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@52.35.22.204:5080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0)<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; external::example.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gateway&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:joeuser@example.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOREG<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal-ipv6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@[::1]:5060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0)<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal-ipv6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@[::1]:5061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0) (TLS)<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@52.35.22.204:5060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0)<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style='background:yellow;mso-highlight:yellow'>internal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:mod_sofia@52.35.22.204:5061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNNING (0) (TLS)</span><o:p></o:p></p><p class=MsoNormal>=================================================================================================<o:p></o:p></p><p class=MsoNormal>4 profiles 1 alias<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><b>Under vars.xml:<o:p></o:p></b></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;sip_tls_version=sslv23&quot;/&gt;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp; &lt;!--<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; TLS cipher suite: default ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; The actual ciphers supported will change per platform.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; openssl ciphers -v 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; Will show you what is available in your verion of openssl.<o:p></o:p></p><p class=MsoNormal>&nbsp; --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;sip_tls_ciphers=ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH&quot;/&gt;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp; &lt;!-- Internal SIP Profile --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;internal_auth_calls=true&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;internal_sip_port=5060&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;internal_tls_port=5061&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;internal_ssl_enable=true&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp; &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;internal_ssl_dir=/usr/local/freeswitch/conf/ssl&quot;/&gt;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><b>Under internel.xml:&nbsp; <o:p></o:p></b></p><p class=MsoNormal>&nbsp;&nbsp;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- TLS: disabled by default, set to &quot;true&quot; to enable --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls&quot; value=&quot;true&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Set to true to not bind on the normal sip-port but only on the TLS port --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-only&quot; value=&quot;false&quot;/&gt;<o:p></o:p></p><p class=MsoNormal> &nbsp;&nbsp;&nbsp;&lt;!-- additional bind parameters for TLS --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-bind-params&quot; value=&quot;transport=tls&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Port to listen on for TLS requests. (5061 will be used if unspecified) --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-sip-port&quot; value=&quot;$${internal_tls_port}&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!--&lt;param name=&quot;tls-cert-dir&quot; value=&quot;&quot;/&gt;--&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp; &nbsp;&lt;param name=&quot;tls-passphrase&quot; value=&quot;&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Verify the date on TLS certificates --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-verify-date&quot; value=&quot;true&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be$<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-verify-policy&quot; value=&quot;in&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-verify-depth&quot; value=&quot;2&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-verify-in-subjects&quot; value=&quot;&quot;/&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- TLS version default: tlsv1,tlsv1.1,tlsv1.2 --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-version&quot; value=&quot;$${sip_tls_version}&quot;/&gt;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- TLS ciphers default: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH&nbsp; --&gt;<o:p></o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;param name=&quot;tls-ciphers&quot; value=&quot;$${sip_tls_ciphers}&quot;/&gt;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Clarie<o:p></o:p></p></div></body></html>