{"id":452,"date":"2011-05-24T16:33:00","date_gmt":"2011-05-24T14:33:00","guid":{"rendered":""},"modified":"2018-11-01T01:06:18","modified_gmt":"2018-11-01T00:06:18","slug":"konfiguracia-podpory-tls-v-openimscore","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/konfiguracia-podpory-tls-v-openimscore\/","title":{"rendered":"Konfigur\u00e1cia podpory TLS v OpenIMSCore"},"content":{"rendered":"<h1><strong>&Uacute;vod<\/strong><\/h1>\n<p><span lang=\"SK\">OpenIMSCore poskytuje mo\u017enos\u0165 &scaron;ifrovanej komunik&aacute;cie  prostredn&iacute;ctvom TLS. TLS sa aktivuje konfigur&aacute;ciou P-CSCF. P-CSCF  umo\u017e\u0148uje &scaron;ifrovan&eacute; spojenie (TLS) cez rozhranie Gm. P-CSCF mus&iacute;  poskytova\u0165 platn&yacute; certifik&aacute;t. TLS User Endpoint nemus&iacute; ma\u0165 platn&yacute;  certifik&aacute;t. <\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span lang=\"SK\">Protokol <b>Transport Layer Security<\/b> (<b>TLS<\/b>)  poskytuje mo\u017enosti na zabezpe\u010denie komunik&aacute;cie na Internete. TLS  poskytuje koncov&yacute; bod overovania a komunik&aacute;cia utajenie cez internet  pomocou &scaron;ifrovania.<\/span><\/p>\n<h1><b><span lang=\"SK\">In&scaron;tal&aacute;cia OpenSSL<\/span><\/b><\/h1>\n<pre><span lang=\"SK\">apt-get install openssl<\/span>\r\n<span lang=\"SK\">apt-get install liblwt-ssl-ocaml-dev<\/span><\/pre>\n<p class=\"MsoNormal\"><span lang=\"SK\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><b><span lang=\"SK\">Remake ser_ims<\/span><\/b><\/p>\n<pre><span lang=\"SK\">cd \/usr\/src\/openimscore<span>            <\/span>\/\/zdrojov&yacute; adres&aacute;r <span>        <\/span><\/span>\r\n<span lang=\"SK\">make all include_modules=tls<span>    <\/span><\/span><\/pre>\n<p><span lang=\"SK\">V \/<i>usr\/src\/openimscore\/modules\/tls<\/i> by sa mal nach&aacute;dza\u0165 s&uacute;bor <b>tls.so.<\/b> Cestu k tomuto s&uacute;boru je treba nastavi\u0165 v \/etc\/openimscore\/pcscf.cfg. Napr&iacute;klad vytvoren&iacute;m symbolick&eacute;ho odkazu na s&uacute;bor <\/span><i><span lang=\"SK\">\/usr\/lib\/ser\/modules\/tls.so<\/span><\/i><span lang=\"SK\">.<\/span><span lang=\"SK\"> <\/span><\/p>\n<pre>\r\n <span lang=\"SK\">ln &ndash;s <i>\/usr\/lib\/ser\/modules\/tls.so <\/i><b>\/usr\/lib\/ser\/modules\/tls.so<\/b><\/span><span lang=\"SK\"><br \/><\/span><\/pre>\n<p class=\"MsoNormal\"><span lang=\"SK\">Odkomentova\u0165 v \/etc\/openimscore\/pcscf.cfg nasledovne riadky, kde je v poznamke <\/span><i><span lang=\"EN-US\">#<\/span><span lang=\"SK\">Uncomment here to enable TLS <\/span><\/i><span lang=\"SK\">respekt&iacute;ve zakomentova\u0165 tie kde je <i>#Comment here to enable TLS.<\/i><\/span>&nbsp;<\/p>\n<pre><span lang=\"SK\"># Uncomment here to enable TLS<\/span>\r\n<span lang=\"SK\">listen=tls:127.0.0.1<\/span>\r\n<span lang=\"SK\">tls_port_no=4061<\/span>\r\n<span lang=\"SK\">enable_tls=yes<\/span>\r\n<span lang=\"SK\"> ...<\/span>\r\n<span lang=\"SK\"> # Comment here to enable TLS!<\/span>\r\n<span lang=\"SK\">#modparam(&quot;pcscf&quot;,&quot;use_tls&quot;,0)<\/span>\r\n<span lang=\"SK\"> ...<\/span>\r\n<span lang=\"SK\"> # Uncomment here to enable TLS!<\/span>\r\n<span lang=\"SK\">modparam(&quot;pcscf&quot;,&quot;use_tls&quot;,1)<\/span>\r\n<span lang=\"SK\">modparam(&quot;pcscf&quot;,&quot;tls_port&quot;,4061) <\/span>\r\n<span lang=\"SK\"> ...<\/span>\r\n<span lang=\"SK\"> # Uncomment here to enable TLS <\/span>\r\n<b><span lang=\"SK\">loadmodule &quot;\/usr\/lib\/ser\/modules\/tls.so&quot;<span>  <\/span># cesta k modulu (1)<\/span><\/b>\r\n\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;tls_method&quot;, &quot;TLSv1&quot;)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;private_key&quot;, &quot;\/opt\/OpenIMSCore\/PCSCF_CA2\/pcscf_private_key.pem&quot;)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;certificate&quot;, &quot;\/opt\/OpenIMSCore\/PCSCF_CA2\/pcscf_cert.pem&quot;)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;ca_list&quot;, &quot;\/opt\/OpenIMSCore\/PCSCF_CA2\/pcscf_ca_list.pem&quot;)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;verify_certificate&quot;, 1)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;require_certificate&quot;, 0)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;,&quot;tls_disable_compression&quot;, 1)<\/span>\r\n<\/pre>\n<h1><b><span lang=\"SK\">Vytvorenie certifikatov<\/span><\/b><\/h1>\n<p><span lang=\"SK\">Vslastn&eacute; certifik&aacute;ty sa daj&uacute; generova\u0165 skriptom, ktor&yacute; sa nach&aacute;dza v zdrojovom adres&aacute;ri u m\u0148a <i>\/usr\/src\/openimscore\/cfg\/tls_prepare.sh<\/i>. Editovan&iacute;m premennej DIR skriptu, zmen&iacute;me adres&aacute;r kam sa bud&uacute; certifik&aacute;ty generova\u0165.<\/span><\/p>\n<pre><span lang=\"SK\">DIR=&quot;\/opt\/OpenIMSCore&quot;<\/span>\r\n<span lang=\"SK\">DIR_NAME=&quot;PCSCF_CA2&quot;<\/span>\r\n\r\n<span lang=\"SK\">cd $DIR<\/span>\r\n\r\n<span lang=\"SK\">echo Creating CA certificate<\/span>\r\n<span lang=\"SK\">echo -----------------------<\/span>\r\n<span lang=\"SK\">echo 1. create CA dir<\/span>\r\n<span lang=\"SK\"><span>        <\/span>mkdir $DIR_NAME<\/span>\r\n<span lang=\"SK\"><span>        <\/span>cd $DIR_NAME<\/span>\r\n\r\n<span lang=\"SK\">...<\/span><\/pre>\n<p class=\"MsoNormal\"><span lang=\"SK\">Po spusten&iacute; skriptu vypln&iacute;me zop&aacute;r &uacute;dajov:<\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"SK\">d&ocirc;le\u017eit&eacute; je: <i>Common Name (eg, YOUR name) []: pcscf.operator-d.local<\/i><\/span>&nbsp;<\/p>\n<pre><span lang=\"SK\">Creating CA certificate<\/span>\r\n<span lang=\"SK\">-----------------------<\/span>\r\n<span lang=\"SK\">1. create CA dir<\/span>\r\n<span lang=\"SK\">2. create ca dir structure and files<span>  <\/span>(see ca(1))<\/span>\r\n<span lang=\"SK\">2. create CA private key<\/span>\r\n<span lang=\"SK\">Generating RSA private key, 2048 bit long modulus<\/span>\r\n<span lang=\"SK\">.................................+++<\/span>\r\n<span lang=\"SK\">.......................+++<\/span>\r\n<span lang=\"SK\">e is 65537 (0x10001)<\/span>\r\n<span lang=\"SK\">3. create CA self-signed certificate<\/span>\r\n<span lang=\"SK\">You are about to be asked to enter information that will be incorporated<\/span>\r\n<span lang=\"SK\">into your certificate request.<\/span>\r\n<span lang=\"SK\">What you are about to enter is what is called a Distinguished Name or a DN.<\/span>\r\n<span lang=\"SK\">There are quite a few fields but you can leave some blank<\/span>\r\n<span lang=\"SK\">For some fields there will be a default value,<\/span>\r\n<span lang=\"SK\">If you enter '.', the field will be left blank.<\/span>\r\n<span lang=\"SK\">-----<\/span>\r\n<span lang=\"SK\">Country Name (2 letter code) [AU]:SK<\/span>\r\n<span lang=\"SK\">State or Province Name (full name) [Some-State]:Zilina<\/span>\r\n<span lang=\"SK\">Locality Name (eg, city) []:Zilina<\/span>\r\n<span lang=\"SK\">Organization Name (eg, company) [Internet Widgits Pty Ltd]:University of Zilina<\/span>\r\n<span lang=\"SK\">Organizational Unit Name (eg, section) []:Katedra<\/span>\r\n<span lang=\"SK\">Common Name (eg, YOUR name) []:pcscf.operator-d.local<\/span>\r\n<span lang=\"SK\">Email Address []:medvedik@gmail.com<\/span>\r\n<span lang=\"SK\">Creating a server\/client certificate<\/span>\r\n<span lang=\"SK\">------------------------------------<\/span>\r\n<span lang=\"SK\">1. create a certificate request (and its private key in privkey.pem)<\/span>\r\n<span lang=\"SK\">WARNING: the organization name should be the same as in the ca certificate.<\/span>\r\n<span lang=\"SK\">Generating a 1024 bit RSA private key<\/span>\r\n<span lang=\"SK\">.....++++++<\/span>\r\n<span lang=\"SK\">..............++++++<\/span>\r\n<span lang=\"SK\">writing new private key to 'privkey.pem'<\/span>\r\n<span lang=\"SK\">-----<\/span>\r\n<span lang=\"SK\">You are about to be asked to enter information that will be incorporated<\/span>\r\n<span lang=\"SK\">into your certificate request.<\/span>\r\n<span lang=\"SK\">What you are about to enter is what is called a Distinguished Name or a DN.<\/span>\r\n<span lang=\"SK\">There are quite a few fields but you can leave some blank<\/span>\r\n<span lang=\"SK\">For some fields there will be a default value,<\/span>\r\n<span lang=\"SK\">If you enter '.', the field will be left blank.<\/span>\r\n<span lang=\"SK\">-----<\/span>\r\n<span lang=\"SK\">Country Name (2 letter code) [AU]:SK<\/span>\r\n<span lang=\"SK\">State or Province Name (full name) [Some-State]:Zilina<\/span>\r\n<span lang=\"SK\">Locality Name (eg, city) []:Zilina<\/span>\r\n<span lang=\"SK\">Organization Name (eg, company) [Internet Widgits Pty Ltd]:University of Zilina<\/span>\r\n<span lang=\"SK\">Organizational Unit Name (eg, section) []:Katedra<\/span>\r\n<span lang=\"SK\">Common Name (eg, YOUR name) []:pcscf.operator-d.local<\/span>\r\n<span lang=\"SK\">Email Address []:medvedik@gmail.com<\/span>\r\n<span lang=\"SK\"> <\/span>\r\n<span lang=\"SK\">Please enter the following 'extra' attributes<\/span>\r\n<span lang=\"SK\">to be sent with your certificate request<\/span>\r\n<span lang=\"SK\">A challenge password []:medvedik<\/span>\r\n<span lang=\"SK\">An optional company name []:pcscf.operator-d.local<\/span>\r\n<span lang=\"SK\">2. sign it with the ca certificate<\/span>\r\n<span lang=\"SK\">Using configuration from \/usr\/lib\/ssl\/openssl.cnf<\/span>\r\n<span lang=\"SK\">Check that the request matches the signature<\/span>\r\n<span lang=\"SK\">Signature ok<\/span>\r\n<span lang=\"SK\">Certificate Details:<\/span>\r\n<span lang=\"SK\"><span>        <\/span>Serial Number: 1 (0x1)<\/span>\r\n<span lang=\"SK\"><span>        <\/span>Validity<\/span>\r\n<span lang=\"SK\"><span>            <\/span>Not Before: May 13 09:58:15 2011 GMT<\/span>\r\n<span lang=\"SK\"><span>            <\/span>Not After : May 12 09:58:15 2012 GMT<\/span>\r\n<span lang=\"SK\"><span>        <\/span>Subject:<\/span>\r\n<span lang=\"SK\"><span>            <\/span>countryName<span>               <\/span>= SK<\/span>\r\n<span lang=\"SK\"><span>            <\/span>stateOrProvinceName<span>       <\/span>= Zilina<\/span>\r\n<span lang=\"SK\"><span>            <\/span>organizationName<span>          <\/span>= University of Zilina<\/span>\r\n<span lang=\"SK\"><span>            <\/span>organizationalUnitName<span>    <\/span>= Katedra<\/span>\r\n<span lang=\"SK\"><span>            <\/span>commonName<span>                <\/span>= pcscf.operator-d.local<\/span>\r\n<span lang=\"SK\"><span>            <\/span>emailAddress<span>              <\/span>= medvedik@gmail.com<\/span>\r\n<span lang=\"SK\"><span>        <\/span>X509v3 extensions:<\/span>\r\n<span lang=\"SK\"><span>            <\/span>X509v3 Basic Constraints: <\/span>\r\n<span lang=\"SK\"><span>                <\/span>CA:FALSE<\/span>\r\n<span lang=\"SK\"><span>            <\/span>Netscape Comment: <\/span>\r\n<span lang=\"SK\"><span>                <\/span>OpenSSL Generated Certificate<\/span>\r\n<span lang=\"SK\"><span>            <\/span>X509v3 Subject Key Identifier: <\/span>\r\n<span lang=\"SK\"><span>                <\/span>46:57:52:AE:0B:1C:85:8D:05:D2:E2:5D:DB:C9:BD:42:FD:46:D1:AB<\/span>\r\n<span lang=\"SK\"><span>            <\/span>X509v3 Authority Key Identifier: <\/span>\r\n<span lang=\"SK\"><span>                <\/span>keyid:A1:FE:E4:B6:43:48:FF:6C:4B:EB:D3:2B:CF:0E:E7:9E:73:09:09:3C<\/span>\r\n<span lang=\"SK\"> <\/span>\r\n<span lang=\"SK\">Certificate is to be certified until May 12 09:58:15 2012 GMT (365 days)<\/span>\r\n<span lang=\"SK\">Sign the certificate? [y\/n]:y<\/span>\r\n<span lang=\"SK\"> <\/span>\r\n<span lang=\"SK\"> <\/span>\r\n<span lang=\"SK\">1 out of 1 certificate requests certified, commit? [y\/n]y<\/span>\r\n<span lang=\"SK\">Write out database with 1 new entries<\/span>\r\n<span lang=\"SK\">Data Base Updated<\/span>\r\n<span lang=\"SK\">Setting ser to use the certificate<\/span>\r\n<span lang=\"SK\">----------------------------------<\/span>\r\n<span lang=\"SK\">1. create the ca list file:<\/span>\r\n<span lang=\"SK\">for each of your ca certificates that you intend to use do:<\/span><\/pre>\n<h1>&nbsp;<b><span lang=\"SK\">Nastavenie cesty k certifik&aacute;tom<\/span><\/b><\/h1>\n<p><span lang=\"SK\">Upravenie <span>&nbsp;<\/span><i>\/etc\/openimscore\/pcscf.cfg<\/i> nastavenie cesty k s&uacute;borom ktor&eacute; sme vygenerovali skriptom v tls_prepare.sh<\/span><\/p>\n<pre><span lang=\"SK\">modparam(&quot;tls&quot;, &quot;tls_method&quot;, &quot;TLSv1&quot;)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;,&quot;private_key&quot;, <b>&quot;\/opt\/OpenIMSCore\/PCSCF_CA\/pcscf_private_key.pem)<\/b><\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;,&quot;certificate&quot;, <b>&quot;\/opt\/OpenIMSCore\/PCSCF_CA\/pcscf_cert.pem&quot;)<\/b><\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;ca_list&quot;,<b>&quot;\/opt\/OpenIMSCore\/PCSCF_CA\/pcscf_ca_list.pem&quot;)<\/b><\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;verify_certificate&quot;, 1)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;, &quot;require_certificate&quot;, 0)<\/span>\r\n<span lang=\"SK\">modparam(&quot;tls&quot;,&quot;tls_disable_compression&quot;, 1)<\/span><span lang=\"SK\"><br \/><\/span><\/pre>\n<h1><b><span lang=\"SK\">Re&scaron;tartovanie pcscf servera<\/span><\/b><\/h1>\n<pre><span lang=\"SK\">V&yacute;pis z logu, ke\u010f sa spustil pcscf s TLS.<\/span>\r\n<span lang=\"SK\">#<\/span>\r\n<span lang=\"SK\"># Launch pcscf - Thu May 12 16:36:08 CEST 2011<\/span>\r\n<span lang=\"SK\">#<\/span>\r\n<span lang=\"SK\">Listening on<\/span>\r\n<span lang=\"SK\"><span>             <\/span>udp: 158.193.139.95 [158.193.139.95]:4060<\/span>\r\n<span lang=\"SK\"><span>             <\/span>tcp: 158.193.139.95 [158.193.139.95]:4060<\/span>\r\n<span lang=\"SK\"><span>             <\/span>tls: 158.193.139.95 [158.193.139.95]:4061<\/span>\r\n<span lang=\"SK\">Aliases:<\/span>\r\n<span lang=\"SK\"><span>             <\/span>*: pcscf.operator-d.local:4060<\/span><span lang=\"SK\"><br \/><\/span>\r\n<\/pre>\n<h1><b><span lang=\"SK\">Z&aacute;ver<\/span><\/b><\/h1>\n<p><span lang=\"SK\">Po splnen&iacute; v&scaron;etk&yacute;ch konfigura\u010dn&yacute;ch  krokov, sa n&aacute;m nepodarilo TLS v&nbsp;OpenIMSCore otestova\u0165, preto\u017ee IMS  klient (Boghe_1.0.58.550 ) vo verzi&iacute; s&nbsp;ktorou sme pracovali<span>&nbsp; <\/span>nemal implementovan&uacute; podporu TLS. Podpora TLS pre tohto klienta je pl&aacute;novan&aacute; v&nbsp;\u010fal&scaron;ej release verzi&iacute;. <\/span><\/p>","protected":false},"excerpt":{"rendered":"<h1><strong>&Uacute;vod<\/strong><\/h1>\n<p><span lang=\"SK\">OpenIMSCore poskytuje mo\u017enos\u0165 &scaron;ifrovanej komunik&aacute;cie  prostredn&iacute;ctvom TLS. TLS sa aktivuje konfigur&aacute;ciou P-CSCF. P-CSCF  umo\u017e\u0148uje &scaron;ifrovan&eacute; spojenie (TLS) cez rozhranie Gm. P-CSCF mus&iacute;  poskytova\u0165 platn&yacute; certifik&aacute;t. TLS User Endpoint nemus&iacute; ma\u0165 platn&yacute;  certifik&aacute;t. <\/span>&nbsp;<\/p>","protected":false},"author":1059,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[729,733],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-ngn-ims","category-ngn-ims-openimscore"],"taxonomy_info":{"category":[{"value":729,"label":"NGN\/IMS"},{"value":733,"label":"OpenIMSCore"}]},"featured_image_src_large":false,"author_info":{"display_name":"","author_link":"https:\/\/nil.uniza.sk\/en\/author\/"},"comment_info":1,"category_info":[{"term_id":729,"name":"NGN\/IMS","slug":"ngn-ims","term_group":0,"term_taxonomy_id":727,"taxonomy":"category","description":"","parent":0,"count":7,"filter":"raw","cat_ID":729,"category_count":7,"category_description":"","cat_name":"NGN\/IMS","category_nicename":"ngn-ims","category_parent":0},{"term_id":733,"name":"OpenIMSCore","slug":"ngn-ims-openimscore","term_group":0,"term_taxonomy_id":731,"taxonomy":"category","description":"","parent":729,"count":5,"filter":"raw","cat_ID":733,"category_count":5,"category_description":"","cat_name":"OpenIMSCore","category_nicename":"ngn-ims-openimscore","category_parent":729}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/1059"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}