2010-06-22 17:04:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Stunnel < Formula
|
2011-12-06 16:09:36 +00:00
|
|
|
url 'ftp://ftp.stunnel.org/stunnel/archive/4.x/stunnel-4.50.tar.gz'
|
2010-06-22 17:04:05 +00:00
|
|
|
homepage 'http://www.stunnel.org/'
|
2011-12-06 16:09:36 +00:00
|
|
|
md5 'd68b4565294496a8bdf23c728a679f53'
|
2010-06-22 17:04:05 +00:00
|
|
|
|
2011-05-10 16:14:21 +00:00
|
|
|
# This patch installs a bogus .pem in lieu of interactive cert generation.
|
2010-06-22 17:04:05 +00:00
|
|
|
def patches
|
|
|
|
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
|
|
|
|
|
2011-05-10 16:14:21 +00:00
|
|
|
This certificate will be used by default unless a config file says otherwise!
|
2010-06-22 17:04:05 +00:00
|
|
|
|
|
|
|
In your stunnel configuration, specify a SSL certificate with
|
|
|
|
the "cert =" option for each service.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-05-10 16:14:21 +00:00
|
|
|
|
2010-06-22 17:04:05 +00:00
|
|
|
__END__
|
|
|
|
diff --git a/tools/stunnel.cnf b/tools/stunnel.cnf
|
2011-07-30 00:06:43 +00:00
|
|
|
index 0c00347..f53668f 100644
|
2010-06-22 17:04:05 +00:00
|
|
|
--- a/tools/stunnel.cnf
|
|
|
|
+++ b/tools/stunnel.cnf
|
2011-07-30 00:06:43 +00:00
|
|
|
@@ -5,6 +5,7 @@ default_bits = 2048
|
|
|
|
encrypt_key = no
|
|
|
|
distinguished_name = req_dn
|
|
|
|
x509_extensions = cert_type
|
|
|
|
+prompt = no
|
|
|
|
|
2010-06-22 17:04:05 +00:00
|
|
|
[ req_dn ]
|
2011-12-06 16:09:36 +00:00
|
|
|
countryName = Country Name (2 letter code)
|