2010-06-22 17:04:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Stunnel < Formula
|
2011-02-18 05:45:32 +00:00
|
|
|
url 'ftp://ftp.stunnel.org/stunnel/stunnel-4.35.tar.gz'
|
2010-06-22 17:04:05 +00:00
|
|
|
homepage 'http://www.stunnel.org/'
|
2011-02-18 05:45:32 +00:00
|
|
|
md5 '2c8e153caee9d954fb7d00980968b50d'
|
2010-06-22 17:04:05 +00:00
|
|
|
|
|
|
|
def patches
|
|
|
|
# This patch installs a bogus .pem in lieu of interactive cert generation
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--disable-libwrap",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--sysconfdir=#{etc}"
|
|
|
|
"--mandir=#{man}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
A bogus SSL server certificate has been installed to:
|
|
|
|
#{etc}/stunnel/stunnel.pem
|
|
|
|
|
|
|
|
This certificate will be used by default unless a config file says
|
|
|
|
otherwise!
|
|
|
|
|
|
|
|
In your stunnel configuration, specify a SSL certificate with
|
|
|
|
the "cert =" option for each service.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/tools/stunnel.cnf b/tools/stunnel.cnf
|
|
|
|
index 274f9a0..d5d7cc0 100644
|
|
|
|
--- a/tools/stunnel.cnf
|
|
|
|
+++ b/tools/stunnel.cnf
|
|
|
|
@@ -7,6 +7,7 @@ default_bits = 1024
|
|
|
|
encrypt_key = yes
|
|
|
|
distinguished_name = req_dn
|
|
|
|
x509_extensions = cert_type
|
|
|
|
+prompt = no
|
|
|
|
|
|
|
|
[ req_dn ]
|
|
|
|
countryName = Country Name (2 letter code)
|
|
|
|
|