certificates.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Generating SSL/TLS certificates for SIP agents and proxies</title>
  5. </head>
  6. <body>
  7. <h1>Generating SSL/TLS certificates for SIP agents and proxies</h1>
  8. <h2>Prerequisites</h2>
  9. The openssl v0.96 or higher must be installed to create the certificates.
  10. <h2>To generate the random seed file</h2>
  11. <strong><pre>$ tport_rand tls_seed.dat
  12. </pre>
  13. </strong>
  14. <h2>To generate the root authority certificate</h2>
  15. <strong><pre>
  16. $ make_root_cert.pl \
  17. -cn &lt;root common name&gt;\
  18. -dns &lt;comma separated list of root dns names&gt;\
  19. [-prefix &lt;prefix for the generated files&gt; (default root)]\
  20. [-rand &lt;random seed file&gt; (default tls_seed.dat)]</pre></strong>
  21. This command will generate files <strong>&lt;prefix&gt;key.pem</strong> (root private key),
  22. <strong>&lt;prefix&gt;cert.pem</strong> (root certificate) and <strong>&lt;prefix&gt;.pem</strong> (combination
  23. of the key and the certificate). The latter file will be used to sign the node certificates.
  24. <h2>To generate a certificate for a single node (user agent or proxy)</h2>
  25. <strong><pre>
  26. $ make_node_cert.pl \
  27. -cn &lt;node common name&gt;\
  28. -dns &lt;comma separated list of node dns names&gt;\
  29. [-ca &lt;cafile&gt; (default root.pem)]\
  30. [-prefix &lt;prefix for the generated files&gt; (default agent)]\
  31. [-rand &lt;random seed file&gt; (default tls_seed.dat)]
  32. </pre></strong>
  33. This command will generate files <strong>&lt;prefix&gt;key.pem </strong> (node private key),
  34. <strong>&lt;prefix&gt;cert.pem</strong> (node certificate) and <strong>&lt;prefix&gt;.pem</strong> (combination
  35. of the key and the certificate). The certificate has been signed with ca certificate
  36. contained in <strong>&lt;cafile&gt;</strong>.
  37. <h2>Installing the certificates to the nodes</h2>
  38. <ol>
  39. <li>Copy the root certificate file (<strong>rootcert.pem</strong> by default - <strong>not root.pem or rootkey.pem!</strong>),
  40. the combined node certificate+key file (<strong>agent.pem</strong>) and <strong>tls_seed.dat</strong> to the tls configuration
  41. directory (default <strong>$HOME/.sip/auth</strong>)</li>
  42. <li>Rename <strong>rootcert.pem</strong> as <strong>cafile.pem</strong></li>
  43. </ol>
  44. <p>
  45. <strong>Note that files agent.pem and tls_seed.dat must be kept secret to
  46. ensure secure connection</strong>
  47. </p>
  48. </ol>
  49. </body>
  50. </html>