From 4eaecf2afe6139b9fe69ed4844421d9be05e3dc1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 19 Jul 2012 22:15:06 -0300 Subject: -a -m SSL fingerprint support --- manifests/init.pp | 7 ++++--- templates/config.py.erb | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index ae25174..fd1aa34 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,8 @@ # Based on https://wiki.koumbit.net/QwebIrc class qwebirc($ircserver = 'irc.myserver.com', $ircport = '6667', $realname = 'http://moo.com/', $webirc_mode = 'None', $base_url = 'http://foo.foo.org/', $network_name = 'FooNet', - $sslport = false, $feedback_from = 'moo@moo.com', $feedback_to = 'moo@moo.com') { + $sslport = false, $feedback_from = 'moo@moo.com', $feedback_to = 'moo@moo.com', + $sslfingerprint = false) { package { [ 'python-twisted', 'python-openssl', 'python-simplejson', 'mercurial' ]: ensure => present, @@ -31,8 +32,8 @@ class qwebirc($ircserver = 'irc.myserver.com', $ircport = '6667', $realname = 'h vcsrepo { "/var/lib/qwebirc": ensure => present, provider => hg, - source => 'https://bitbucket.org/qwebirc/qwebirc', - revision => '48dfc2ca0def', + source => 'https://bitbucket.org/rhatto/qwebirc', + revision => 'cbc58859a6e1', owner => 'qwebirc', group => 'qwebirc', require => [ User['qwebirc'], Group['qwebirc'], Package['mercurial'] ], diff --git a/templates/config.py.erb b/templates/config.py.erb index eec708b..b960f37 100644 --- a/templates/config.py.erb +++ b/templates/config.py.erb @@ -26,6 +26,13 @@ IRCSERVER, IRCPORT = "<%= ircserver %>", <%= ircport %> # If this option is uncommented it will override IRCPORT. SSLPORT = <%= sslport %> <% end %> + +<% if sslfingerprint != false %> +# OPTION: SSLFINGERPRINT +# SHA1 Fingerprint of the IRC Server SSL key. Connections +# will fail if this fingerprint doesn't match. +SSLFINGERPRINT = <%= sslfingerprint %> +<% end %> # OPTION: REALNAME # The realname field of IRC clients will be set to this value. REALNAME = "<%= realname %>" -- cgit v1.2.3