<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: Tue, 7 Sep 2010 09:47: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] please help to register sip phone to kamailio server via tls support.<br>&gt; <br>&gt; I couldn't follow what you exactly did, but you should<br>&gt; <br>&gt; 1. create a self-signed CA certificate<br>&gt; <br>&gt; 2. create private and public key for server. Make certificate signing <br>&gt; request (CSR) from the public key. Sign this CSR with the CA certificate <br>&gt; - this will give you the server certificate.<br>&gt; <br>&gt; 3. configure in Kamailio the server's public key (certificate), the <br>&gt; server's private key and the CA certificate as CA list.<br>&gt; <br>&gt; 4. Import the CA certificate into the TLS client (e.g. the SIP client)<br>&gt; <br>&gt; You can test if the Kamailio configuration works by using a browser e.g:<br>&gt; <br>&gt; - surf with Internet Explorer to<br>&gt;     https://domain.name.ofyour.sipproxy:5061/<br>&gt;    This should give you a certificate warning (do NOT accept the <br>&gt; certificate)<br>&gt; <br>&gt; - close Internet Explorer<br>&gt; <br>&gt; - import CA certificate into Windows certificate store<br>&gt; <br>&gt; - surf with Internet Explorer again to<br>&gt;     https://domain.name.ofyour.sipproxy:5061/<br>&gt;    This time there should not be any certificate warning.<br>&gt; <br>&gt; <br>&gt; You can also try other SIP clients, e.g. eyebeam (uses Windows <br>&gt; certificate store), twinkle (Linux) or QjSimple (let you specify the CA <br>&gt; file manually, do not configure client certificate and private key)<br>&gt; <br>&gt; regards<br>&gt; klaus<br><br>Hi Klaus,<br>i have configure as your advise :<br>&gt;1. create a self-signed CA certificate<br><pre class="programlisting">Creating CA certificate<br>-----------------------<br>1. create CA dir<br>        mkdir ca<br>        cd ca<br>        <br>2. create ca dir structure and files  (see ca(1))<br>        mkdir demoCA #default CA name, edit /etc/ss/openssl.cnf<br>        mkdir  demoCA/private<br>        mkdir demoCA/newcerts<br>        touch demoCA/index.txt<br>        echo 01 &gt;demoCA/serial<br>        <br>2. create CA private key<br>        openssl genrsa -out demoCA/private/cakey.pem 2048<br>        chmod 600 demoCA/private/cakey.pem<br>        <br>3. create CA self-signed certificate<br>        openssl req -out demoCA/cacert.pem   -x509 -new -key demoCA/private/cakey.pem<br></pre>&gt; 2. create private and public key for server. Make certificate signing <br>&gt; request (CSR) from the public key. Sign this CSR with the CA certificate <br>&gt; - this will give you the server certificate.<br><br><pre class="programlisting">Creating a server/client certificate<br>------------------------------------<br>1. create a certificate request (and its private key in privkey.pem)<br>        openssl req -out ser1_cert_req.pem -new -nodes<br>   WARNING: the organization name should be the same as in the ca certificate.<br>        <br>2. sign it with the ca certificate<br><br><br>        openssl ca -in ser1_cert_req.pem -out ser1_cert.pem<br><br>so "ser1_cert.pem" is server certificate.<br><br>&gt; 3. configure in Kamailio the server's public key (certificate), the <br>&gt; server's private key and the CA certificate as CA list.<br><br>my configure is :<br><br>modparam("tls", "tls_method", "TLSv1")<br>modparam("tls", "certificate", "/usr/local/etc/kamailio/ser1_cert.pem")    #server cert<br>modparam("tls", "private_key", "/usr/local/etc/kamailio/privkey.pem")       #privkey<br>modparam("tls", "ca_list", "/usr/local/etc/kamailio/calist.pem")             #ca cert<br>modparam("tls", "verify_certificate", 1)<br>modparam("tls", "require_certificate", 1)<br><br><br>&gt; 4. Import the CA certificate into the TLS client (e.g. the SIP client)<br><br>i copy calist.pem to my pc, and add to ie certificate, test:<br><br>the result is :<br><br>--&gt; start kamailio is ok.<br>--&gt; open ie :as you describe, add calist.pem to Windows certificate store ,but it fail.<br><br>message is : Windows cannot validate that the certificate is actually from 192.168.1.81.you should confirm its orgin by contacting 192.168.1.81.................<br><br><br>please help me to fix it .<br>thank you so much.<br>Peter Green.<br></pre>&nbsp;<br>                                               </body>
</html>