diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-10 22:53:26 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-10 22:53:26 -0400 |
commit | 45adb5ca9da81ae202f1da09ddfdb2e1053c064f (patch) | |
tree | 206ac21fb12d8890fb140e59c4fa07f6bee25e28 | |
parent | f1e3f91bbbcfcd0332aae7d0bde630400866c8ca (diff) | |
parent | f462ff8a7f9b2dcea585dc3e032374974a133158 (diff) |
Merge remote-tracking branch 'orca/master'
-rw-r--r-- | standalone/android/haskell-patches/x509-system-support-Android-cert-store.patch | 36 | ||||
-rwxr-xr-x | standalone/android/install-haskell-packages | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/standalone/android/haskell-patches/x509-system-support-Android-cert-store.patch b/standalone/android/haskell-patches/x509-system-support-Android-cert-store.patch new file mode 100644 index 000000000..b3aa407df --- /dev/null +++ b/standalone/android/haskell-patches/x509-system-support-Android-cert-store.patch @@ -0,0 +1,36 @@ +From 2c736615e38ee4f582af9d98d7169cf07b84d875 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 10 Feb 2014 23:27:32 +0000 +Subject: [PATCH] support Android cert store + +Android puts it in a different place and has only hashed files. +See https://github.com/vincenthz/hs-certificate/issues/19 +--- + System/X509/Unix.hs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/System/X509/Unix.hs b/System/X509/Unix.hs +index cbf9bbe..cab4f4a 100644 +--- a/System/X509/Unix.hs ++++ b/System/X509/Unix.hs +@@ -34,7 +34,7 @@ import qualified Control.Exception as E + import Data.Char + + defaultSystemPath :: FilePath +-defaultSystemPath = "/etc/ssl/certs/" ++defaultSystemPath = "/system/etc/security/cacerts/" + + envPathOverride :: String + envPathOverride = "SYSTEM_CERTIFICATE_PATH" +@@ -46,7 +46,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten + && isDigit (s !! 9) + && (s !! 8) == '.' + && all isHexDigit (take 8 s) +- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x) ++ isCert x = (not $ isPrefixOf "." x) + + getSystemCertificateStore :: IO CertificateStore + getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates) +-- +1.7.10.4 + diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 749f45f62..c56f3b250 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -86,6 +86,7 @@ install_pkgs () { patched skein patched lens patched certificate + patched x509-system patched persistent-template patched system-filepath patched wai-app-static |