<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br><br>&gt; Date: Thu, 9 Sep 2010 16:17:18 +0200<br>&gt; From: klaus.mailinglists@pernau.at<br>&gt; To: betergreen@live.com<br>&gt; CC: sr-users@lists.sip-router.org<br>&gt; Subject: Re: [SR-Users] help with tls error :sslv3 alert bad certificate<br>&gt; <br>&gt; <br>&gt; <br>&gt; Am 09.09.2010 12:00, schrieb peter_green lion:<br>&gt; &gt;<br>&gt; &gt;  &gt; Date: Thu, 9 Sep 2010 11:13:19 +0200<br>&gt; &gt;  &gt; From: klaus.mailinglists@pernau.at<br>&gt; &gt;  &gt; To: betergreen@live.com<br>&gt; &gt;  &gt; CC: sr-users@lists.sip-router.org<br>&gt; &gt;  &gt; Subject: Re: [SR-Users] help with tls error :sslv3 alert bad certificate<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; Am 09.09.2010 10:17, schrieb peter_green lion:<br>&gt; &gt;  &gt; &gt; hi all,<br>&gt; &gt;  &gt; &gt; i have configure tls support as this link:<br>&gt; &gt;  &gt; &gt; http://www.kamailio.org/docs/tls-devel.html#id2451496<br>&gt; &gt;  &gt; &gt; and i add certificate to 3CX sip phone is "cacert.pem" but when i<br>&gt; &gt;  &gt; &gt; register sip phone, the log file in kamailio server is :<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; Sep 9 15:13:36 appliance /usr/local/sbin/kamailio[2146]: ERROR: tls<br>&gt; &gt;  &gt; &gt; [tls_server.c:392]: SSL error:error:14094412:SSL<br>&gt; &gt;  &gt; &gt; routines:SSL3_READ_BYTES:sslv3 alert bad certificate<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; I think the means that the SIP phone sends the ALERT because the it does<br>&gt; &gt;  &gt; not accept the certificate of the server. So you h ave to debug why the<br>&gt; &gt;  &gt; SIP phone does not accept the certificate.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; You really should test with another SIP client first.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; regards<br>&gt; &gt;  &gt; Klaus<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; my configure in kamailio.cfg as :<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; modparam("tls", "tls_method", "TLSv1")<br>&gt; &gt;  &gt; &gt; modparam("tls", "tls_method", "SSLv23")<br>&gt; &gt;  &gt; &gt; modparam("tls", "certificate",<br>&gt; &gt;  &gt; &gt; "/usr/local/etc/kamailio//tls/user/user-cert.pem")<br>&gt; &gt;  &gt; &gt; modparam("tls", "private_key",<br>&gt; &gt;  &gt; &gt; "/usr/local/etc/kamailio//tls/user/user-privkey.pem")<br>&gt; &gt;  &gt; &gt; modparam("tls", "ca_list",<br>&gt; &gt;  &gt; &gt; "/usr/local/etc/kamailio//tls/user/user-calist.pem")<br>&gt; &gt;  &gt; &gt; modparam("tls", "verify_certificate",0 )<br>&gt; &gt;  &gt; &gt; modparam("tls", "require_certificate",0 )<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; please suggest to fix this error.<br>&gt; &gt;  &gt; &gt; thanks and regards.<br>&gt; &gt;  &gt; &gt; Peter Green.<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; _ ______________________________________________<br>&gt; &gt;  &gt; &gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; &gt;  &gt; &gt; sr-users@lists.sip-router.org<br>&gt; &gt;  &gt; &gt; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; hi Klaus,<br>&gt; &gt; i add certificate to internet explorer, but it fail:<br>&gt; &gt; when i view this certificate i see that error:<br>&gt; &gt;<br>&gt; &gt; "this certificate has expired or is not yet valid"<br>&gt; &gt;<br>&gt; &gt; is mean this certificate is wrong ?<br>&gt; <br>&gt; Yes. It is either expired or not yet valid!<br>&gt; &gt;<br>&gt; &gt; so how do i make it correct ?<br>&gt; <br>&gt; Hope this ends this endless conversation<br>&gt; <br>&gt; http://www.kamailio.org/dokuwiki/doku.php/tls:create-certificates<br>&gt; <br>&gt; regards<br>&gt; klaus<br>&gt; <br><br>hi Klaus,<br>I hope i could close this question, but i cannot make it work.<br>i did as the document which you send me. <br>and when i test certificate with command as:<br><br>[root@appliance kamailio]# openssl s_client -connect localhost:5061 -tls1 -CAfile /etc/certs/demoCA/cert.pem<br>CONNECTED(00000003)<br>depth=1 /C=AT/ST=Vienna/L=Vienna/O=My private CA/CN=My private CA<br>verify return:1<br>depth=0 /C=AT/ST=Berkshire/L=Berlin/O=berlin-calling.com/CN=berlin-calling.com<br>verify return:1<br>2962:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1086:SSL alert number 40<br>2962:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:530:<br><br><br>[root@appliance kamailio]# openssl s_client -connect localhost:5061 -ssl2 -CAfile /etc/certs/demoCA/cert.pem<br>CONNECTED(00000003)<br>depth=1 /C=AT/ST=Vienna/L=Vienna/O=My private CA/CN=My private CA<br>verify return:1<br>depth=0 /C=AT/ST=Berkshire/L=Berlin/O=berlin-calling.com/CN=berlin-calling.com<br>verify return:1<br>2963:error:1407F0E5:SSL routines:SSL2_WRITE:ssl handshake failure:s2_pkt.c:428:<br><br><br>[root@appliance kamailio]# openssl s_client -connect localhost:5061 -ssl3 -CAfile /etc/certs/demoCA/cert.pem<br>CONNECTED(00000003)<br>depth=1 /C=AT/ST=Vienna/L=Vienna/O=My private CA/CN=My private CA<br>verify return:1<br>depth=0 /C=AT/ST=Berkshire/L=Berlin/O=berlin-calling.com/CN=berlin-calling.com<br>verify return:1<br>2964:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1086:SSL alert number 40<br>2964:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:530:<br><br>and i have the same error as last email.<br><br>please help me to handle this error.<br>thanks for help me.<br>regards,<br>Peter Green.<br>                                               </body>
</html>