[asterisk-commits] sip to pjsip: Add cert file and ca list path. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 18 11:48:37 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: sip_to_pjsip: Add cert_file and ca_list_path.
......................................................................


sip_to_pjsip: Add cert_file and ca_list_path.

When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were
not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
---
M contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
index 8909216..ecbac13 100755
--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
@@ -464,6 +464,7 @@
 #        bind
 #        async_operations
 #        ca_list_file
+#        ca_list_path
 #        cert_file
 #        privkey_file
 #        password
@@ -697,6 +698,12 @@
     set_value('bind', bind, 'transport-tls', pjsip, nmapped, 'transport')
 
 
+def set_tls_cert_file(val, pjsip, section, nmapped):
+    """Sets cert_file based on sip.conf tlscertfile"""
+    set_value('cert_file', val, section, pjsip, nmapped,
+              'transport')
+
+
 def set_tls_private_key(val, pjsip, nmapped):
     """Sets privkey_file based on sip.conf tlsprivatekey or sslprivatekey"""
     set_value('priv_key_file', val, 'transport-tls', pjsip, nmapped,
@@ -711,6 +718,12 @@
 def set_tls_cafile(val, pjsip, nmapped):
     """Sets ca_list_file based on sip.conf tlscafile"""
     set_value('ca_list_file', val, 'transport-tls', pjsip, nmapped,
+              'transport')
+
+
+def set_tls_capath(val, pjsip, nmapped):
+    """Sets ca_list_path based on sip.conf tlscapath"""
+    set_value('ca_list_path', val, 'transport-tls', pjsip, nmapped,
               'transport')
 
 
@@ -755,9 +768,11 @@
 
     tls_map = [
         (['tlsbindaddr', 'sslbindaddr'], set_tls_bindaddr),
+        (['tlscertfile', 'sslcert', 'tlscert'], set_tls_cert_file),
         (['tlsprivatekey', 'sslprivatekey'], set_tls_private_key),
         (['tlscipher', 'sslcipher'], set_tls_cipher),
         (['tlscafile'], set_tls_cafile),
+        (['tlscapath', 'tlscadir'], set_tls_capath),
         (['tlsverifyclient'], set_tls_verifyclient),
         (['tlsdontverifyserver'], set_tls_verifyserver),
         (['tlsclientmethod', 'sslclientmethod'], set_tls_method)

-- 
To view, visit https://gerrit.asterisk.org/3614
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list