<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)">
<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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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="PT-BR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all, I’m trying to set up opensips with TLS enabled. I followed the webnair to install opensips and the advanced tutorial about TLS. Everything seems to be configured correctly but when I try to register using TLS
it fails. I tried both latest LTS version and the master version of opensips, Bria and Linphone softphones and the default and customized TLS certificates. For all tests I got this log:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:probe_max_sock_buff: getsockopt: snd is initially 262142<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: INFO:core:probe_max_sock_buff: using snd buffer of 255 kb<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: INFO:core:init_sock_keepalive: -- TCP keepalive enabled on socket<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:print_ip: tcpconn_new: new tcp connection to: 192.168.14.26<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tcpconn_new: on port 50853, type 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_tcpconn_init: entered: Creating a whole new ssl connection<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_tcpconn_init: looking up socket based TLS server domain [192.168.14.23:5061]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_find_server_domain: virtual TLS server domain not found, Using default TLS server domain settings<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_tcpconn_init: found socket based TLS server domain [0.0.0.0:0]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_tcpconn_init: Setting in ACCEPT mode (server)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tcpconn_add: hashes: 613, 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:handle_new_connect: new connection: 0x7f3aeafa9eb8 25 flags: 0002<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:send2child: to tcp child 0 0(3314), 0x7f3aeafa9eb8 rw 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:handle_io: We have received conn 0x7f3aeafa9eb8 with rw 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:io_watch_add: io_watch_add op on 20 (0x84d120, 20, 2, 0x7f3aeafa9eb8,1), fd_no=1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: Using the global ( per process ) buff
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_update_fd: New fd is 20<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: Using the global ( per process ) buff
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_update_fd: New fd is 20<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:tls_accept: New TLS connection from 192.168.14.26:50853 accepted<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_accept: new TLS connection from 192.168.14.26:50853 using TLSv1/SSLv3 AES256-SHA 256<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_accept: local socket: 192.168.14.23:5061<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:tls_accept: Client did not present a TLS certificate<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:tls_dump_cert_info: tls_accept: local TLS server certificate subject: /C=XY/ST=Some State/O=My Large Organization Name/OU=My Subunit of Large
Organization/CN=somename.somewhere.com/emailAddress=root@somename.somewhere.com, issuer: /CN=Your_NAME/ST=Your_STATE/C=CO/emailAddress=YOUR_EMAIL/O=YOUR_ORG_NAME<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_update_fd: New fd is 20<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: read= 0 bytes, parsed=0, state=0, error=1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: last char=0x00, parsed msg=#012<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: We didn't manage to read a full request. Back to child poll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: tcp_read_req end<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: Using the per connection buff
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_update_fd: New fd is 20<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:_tls_read: TLS connection to 192.168.14.26:50853 closed cleanly<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: read= 0 bytes, parsed=0, state=0, error=1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: last char=0x00, parsed msg=#012<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: EOF<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:io_watch_del: io_watch_del op on index -1 20 (0x84d120, 20, -1, 0x10,0x3) fd_no=2 called<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:release_tcpconn: releasing con 0x7f3aeafa9eb8, state -1, fd=20, id=3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:release_tcpconn: extra_data 0x7f3aeafaa038<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:handle_tcp_child: reader response= 7f3aeafa9eb8, -1 from 0
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tcpconn_destroy: destroying connection 0x7f3aeafa9eb8, flags 0002<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_close: closing TLS connection<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_update_fd: New fd is 25<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_shutdown: shutdown successful<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3318]: DBG:core:tls_tcpconn_clean: entered<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So it seems the TLS connection was accepted:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:tls_accept: New TLS connection from 192.168.14.26:50853 accepted<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_accept: new TLS connection from 192.168.14.26:50853 using TLSv1/SSLv3 AES256-SHA 256<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But then some error occurs and the connection is closed:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: We didn't manage to read a full request. Back to child poll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: tcp_read_req end<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tcp_read_req: Using the per connection buff
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: DBG:core:tls_update_fd: New fd is 20<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jan 20 15:41:27 devmachine /usr/local/opensips/sbin/opensips[3314]: INFO:core:_tls_read: TLS connection to 192.168.14.26:50853 closed cleanly<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Any help is appreciated. Thanks.<o:p></o:p></span></p>
</div>
</body>
</html>