diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-11 02:50:51 +0000 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-11 02:50:51 +0000 |
commit | f462ff8a7f9b2dcea585dc3e032374974a133158 (patch) | |
tree | 6c0d7fb6b600dfdaf9ef7749a8cd19d1cc83b6ea /standalone | |
parent | 7dd86927078adffde6d33c73fb21c55796fe7c56 (diff) |
add android patch for x509-system cert store
Diffstat (limited to 'standalone')
-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 |