From 7430e42637875ac69b2b188a584e3779e8b6cf4c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 9 Jun 2011 18:19:00 -0400 Subject: Adding Jabber, Jabber-SSL and Gadu-Gadu protocols. Add SSL Certificate and associated textareas --- config/imspector-wip/imspector.inc | 37 +++++++++++++++++++++++-- config/imspector-wip/imspector.xml | 57 ++++++++++++++++++++++++++++++++++---- 2 files changed, 86 insertions(+), 8 deletions(-) (limited to 'config/imspector-wip') diff --git a/config/imspector-wip/imspector.inc b/config/imspector-wip/imspector.inc index b760bc3b..4ab72510 100644 --- a/config/imspector-wip/imspector.inc +++ b/config/imspector-wip/imspector.inc @@ -2,7 +2,7 @@ /* imspector.inc part of pfSense (http://www.pfsense.com/) - + Copyright (C) 2011 Scott Ullrich . Copyright (C) 2007 Ryan Wagoner . All rights reserved. @@ -72,6 +72,12 @@ function imspector_proto_to_port ($proto) { switch ($proto) { + case 'gadu-gadu': + return 8074; + case 'jabber': + return 5222; + case 'jabber-ssl': + return 5223; case 'msn': return 1863; case 'icq': @@ -219,6 +225,32 @@ write_imspector_config(IMSPECTOR_ETC . '/acl_blacklist.txt', str_replace("\r", '', base64_decode($imspector_config["acl_blacklist"]))); } + + // Handle Jabber SSL options + if($imspector_config["ssl_ca_key"] && + $imspector_config["ssl_ca_cert"] && + $imspector_config["serverkey"]) { + if(!is_dir("/usr/local/etc/imspector/ssl")) + mkdir("/usr/local/etc/imspector/ssl"); + if(base64_decode($imspector_config["ssl_ca_key"])) { + file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_key.pem", + base64_decode($imspector_config["ssl_ca_key"])); + $conf['ssl_ca_key'] = '/usr/local/etc/imspector/ssl/ssl_ca_key.pem'; + } + if(base64_decode($imspector_config["ssl_ca_cert"])) { + file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_cert.pem", + base64_decode($imspector_config["ssl_ca_cert"])); + $conf['ssl_ca_key'] = "/usr/local/etc/imspector/ssl/ssl_ca_cert.pem"; + } + if(base64_decode($imspector_config["serverkey"])) { + file_put_contents("/usr/local/etc/imspector/ssl/serverkey.pem", + base64_decode($imspector_config["serverkey"])); + $conf['ssl_key'] = '/usr/local/etc/imspector/ssl/serverkey.pem'; + } + } else { + // SSL Not enabled. Make sure Jabber-SSL is not processed. + unset($conf['jabber-ssl']); + } $conftext = ''; foreach($conf as $var => $key) @@ -283,4 +315,5 @@ EOD; config_unlock(); } -?> + +?> \ No newline at end of file diff --git a/config/imspector-wip/imspector.xml b/config/imspector-wip/imspector.xml index b8eb535d..aadcd4c0 100644 --- a/config/imspector-wip/imspector.xml +++ b/config/imspector-wip/imspector.xml @@ -4,12 +4,12 @@ . + Copyright (C) 2011 Scott Ullrich + Copyright (C) 2007 Ryan Wagoner All rights reserved. */ /* ========================================================================== */ @@ -84,7 +84,7 @@ Enable IMSpector enable checkbox - + Interfaces (generally LAN) iface_array @@ -98,7 +98,7 @@ Listen on protocols proto_array - You can use the CTRL or COMMAND key to select multiple protocols. + You can use the CTRL or COMMAND key to select multiple protocols. NOTE: Gtalk/Jabber-SSL requires SSL certificates. select 4 @@ -120,6 +120,18 @@ IRC irc + + + @@ -154,6 +166,39 @@ mysql_password password + + SSL Certificate + serverkey + + Enter the SSL Server Certificate here. + + textarea + base64 + 5 + 40 + + + SSL CA Key + ssl_ca_key + + Enter the SSL CA key here. + + textarea + base64 + 5 + 40 + + + SSL CA Certificate + ssl_ca_cert + + Enter the SSL CA Certficate here. + + textarea + base64 + 5 + 40 + Enable bad word filtering filter_badwords @@ -219,4 +264,4 @@ deinstall_package_imspector(); imspector_generate_rules - + \ No newline at end of file -- cgit v1.2.3