aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/stunnel.rb
blob: 62d4488e5c2a5e4d9f6ed2a3bd680ab546a721fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'formula'

class Stunnel < Formula
  url 'ftp://ftp.stunnel.org/stunnel/stunnel-4.37.tar.gz'
  homepage 'http://www.stunnel.org/'
  md5 '8d4e2cefbef6638da95986a3d44c1b4a'

  # This patch installs a bogus .pem in lieu of interactive cert generation.
  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

      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)