diff options
| author | Tim D. Smith | 2014-10-19 23:58:29 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2014-10-20 09:45:43 -0700 |
| commit | 94f3f345cb5034169eb51c0ffbc662f6ef06e947 (patch) | |
| tree | 9ff5c4a8198461ec92b4704b18d7fd61f3a49471 /Library/Homebrew | |
| parent | 8c6efd8993215dfa8ae73041300d4d538dcb09b3 (diff) | |
| download | brew-94f3f345cb5034169eb51c0ffbc662f6ef06e947.tar.bz2 | |
add audit check for system OpenSSL linkage
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula_cellar_checks.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 939b55b1c..4b5e1cc9e 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -134,6 +134,23 @@ module FormulaCellarChecks EOS end + def check_openssl_links prefix + return unless prefix.directory? + keg = Keg.new(prefix) + system_openssl = keg.mach_o_files.select do |obj| + dlls = obj.dynamically_linked_libraries + dlls.any? { |dll| /\/usr\/lib\/lib(crypto|ssl).(\d\.)*dylib/.match dll } + end + return if system_openssl.empty? + + <<-EOS.undent + object files were linked against system openssl + These object files were linked against the deprecated system OpenSSL. + Adding `depends_on "openssl"` to the formula may help. + #{system_openssl * "\n "} + EOS + end + def audit_installed audit_check_output(check_manpages) audit_check_output(check_infopages) @@ -145,6 +162,7 @@ module FormulaCellarChecks audit_check_output(check_generic_executables(f.sbin)) audit_check_output(check_shadowed_headers) audit_check_output(check_easy_install_pth(f.lib)) + audit_check_output(check_openssl_links(f.prefix)) end private |
