{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/42966","labels_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42966/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42966/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42966/events","html_url":"https://github.com/Homebrew/homebrew/issues/42966","id":101151903,"number":42966,"title":"Build OpenSSH with brewed Heimdal Kerberos","user":{"login":"azag0","id":940353,"avatar_url":"https://avatars.githubusercontent.com/u/940353?v=3","gravatar_id":"","url":"https://api.github.com/users/azag0","html_url":"https://github.com/azag0","followers_url":"https://api.github.com/users/azag0/followers","following_url":"https://api.github.com/users/azag0/following{/other_user}","gists_url":"https://api.github.com/users/azag0/gists{/gist_id}","starred_url":"https://api.github.com/users/azag0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azag0/subscriptions","organizations_url":"https://api.github.com/users/azag0/orgs","repos_url":"https://api.github.com/users/azag0/repos","events_url":"https://api.github.com/users/azag0/events{/privacy}","received_events_url":"https://api.github.com/users/azag0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-15T08:28:22Z","updated_at":"2015-08-15T12:52:23Z","closed_at":null,"body":"Apple's Heimdal Kerberos in Yosemite is built without support for weak encryption (DES), which makes it unusable on systems that do not support strong encryption such as OpenAFS or legacy infrastructures.\r\n\r\nEven when Homebrew's Heimdal (with support for weak encryption) is installed, OpenSSH builds (with `--build-from-source`) with Apple's Kerberos framework, not the brewed Heimdal.\r\n\r\n```bash\r\n$ otool -L /usr/local/bin/ssh | grep -i kerberos\r\n\t/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)\r\n```\r\n\r\nWhat would be the cleanest way to add support for building OpenSSH with the brewed Heimdal?"},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments/131367849","html_url":"https://github.com/Homebrew/homebrew/issues/42966#issuecomment-131367849","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42966","id":131367849,"user":{"login":"tzudot","id":6291184,"avatar_url":"https://avatars.githubusercontent.com/u/6291184?v=3","gravatar_id":"","url":"https://api.github.com/users/tzudot","html_url":"https://github.com/tzudot","followers_url":"https://api.github.com/users/tzudot/followers","following_url":"https://api.github.com/users/tzudot/following{/other_user}","gists_url":"https://api.github.com/users/tzudot/gists{/gist_id}","starred_url":"https://api.github.com/users/tzudot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzudot/subscriptions","organizations_url":"https://api.github.com/users/tzudot/orgs","repos_url":"https://api.github.com/users/tzudot/repos","events_url":"https://api.github.com/users/tzudot/events{/privacy}","received_events_url":"https://api.github.com/users/tzudot/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T12:52:23Z","updated_at":"2015-08-15T12:52:23Z","body":"```diff\r\ndiff --git a/openssh.rb b/openssh.rb\r\nindex ee98be4..9d9484c 100644\r\n--- a/openssh.rb\r\n+++ b/openssh.rb\r\n@@ -19,6 +19,7 @@ class Openssh < Formula\r\n   depends_on \"openssl\" => :recommended\r\n   depends_on \"libressl\" => :optional\r\n   depends_on \"ldns\" => :optional\r\n+  depends_on \"heimdal\" => :optional\r\n   depends_on \"pkg-config\" => :build if build.with? \"ldns\"\r\n\r\n   patch do\r\n@@ -38,11 +39,16 @@ class Openssh < Formula\r\n     args = %W[\r\n       --with-libedit\r\n       --with-pam\r\n-      --with-kerberos5\r\n       --prefix=#{prefix}\r\n       --sysconfdir=#{etc}/ssh\r\n     ]\r\n\r\n+    if build.with? \"heimdal\"\r\n+      args << \"--with-kerberos5=#{Formula[\"heimdal\"].opt_prefix}\"\r\n+    else\r\n+      args << \"--with-kerberos5\"\r\n+    end\r\n+\r\n     if build.with? \"libressl\"\r\n       args << \"--with-ssl-dir=#{Formula[\"libressl\"].opt_prefix}\"\r\n     else\r\n```"}}