diff options
| author | Rob Austein | 2013-10-15 11:49:19 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2013-11-17 11:41:30 -0800 |
| commit | 6d8ae317ba7e7cc8359833be792deb6c03b2e6a4 (patch) | |
| tree | fdae455fce5ce1c7efe5926cbe36481ec4348ab1 /Library/Formula | |
| parent | 73f0d60e81a830ff4b8afc8a8292abb5f605445a (diff) | |
| download | homebrew-6d8ae317ba7e7cc8359833be792deb6c03b2e6a4.tar.bz2 | |
stunnel: Add TLSv1.1 and TLSv1.2 support
The system copy of OpenSSL is too old to support TLS versions 1.1 and
1.2. This matters because TLS v1.2 includes a number of ciphers that
are stronger than anything available in earlier versions, so people
who need to use those ciphers need TLS 1.2 support.
stunnel enables TLSv1.2 and the stronger ciphers automatically when
compiled with a sufficiently recent version of OpenSSL, so the change
here is just to add the usual "--with-brewed-openssl" option to the
stunnel formula.
Closes #23319.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/stunnel.rb | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/Library/Formula/stunnel.rb b/Library/Formula/stunnel.rb index e676f2d90..352f79a7e 100644 --- a/Library/Formula/stunnel.rb +++ b/Library/Formula/stunnel.rb @@ -6,6 +6,11 @@ class Stunnel < Formula mirror 'http://ftp.nluug.nl/pub/networking/stunnel/stunnel-4.56.tar.gz' sha256 '9cae2cfbe26d87443398ce50d7d5db54e5ea363889d5d2ec8d2778a01c871293' + # We need Homebrew OpenSSL for TLSv1.2 support + option 'with-brewed-openssl', 'Build with Homebrew OpenSSL instead of the system version' + + depends_on "openssl" if MacOS.version <= :leopard or build.with?('brewed-openssl') + # This patch installs a bogus .pem in lieu of interactive cert generation. # - additionally stripping carriage-returns def patches @@ -13,11 +18,20 @@ class Stunnel < Formula end def install - system "./configure", "--disable-dependency-tracking", - "--disable-libwrap", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--mandir=#{man}" + + args = [ + "--disable-dependency-tracking", + "--disable-libwrap", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--mandir=#{man}", + ] + + if MacOS.version <= :leopard or build.with?('brewed-openssl') + args << "--with-ssl-dir=#{Formula.factory('openssl').opt_prefix}" + end + + system "./configure", *args system "make install" end |
