diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-26 08:14:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-26 08:14:57 -0400 |
commit | 1d48e19b5a47df04abcce777e6543dabb17f2ce5 (patch) | |
tree | b0309fcfb109009a47ebbd11c0ef5cdd7f0d1452 /Utility | |
parent | 86648b502149d32ee0f9af200e949e8240208a8c (diff) |
remove 3 build flags
* Removed the webapp-secure build flag, rolling it into the webapp build
flag.
* Removed the quvi and tahoe build flags, which only adds aeson to
the core dependencies.
* Removed the feed build flag, which only adds feed to the core
dependencies.
Build flags have cost in both code complexity and also make Setup configure
have to work harder to find a usable set of build flags when some
dependencies are missing.
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/WebApp.hs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index 1a068a9b2..29deb24df 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -31,10 +31,8 @@ import Blaze.ByteString.Builder.Char.Utf8 (fromText) import Blaze.ByteString.Builder (Builder) import Control.Arrow ((***)) import Control.Concurrent -#ifdef WITH_WEBAPP_SECURE import Data.SecureMem import Data.Byteable -#endif #ifdef __ANDROID__ import Data.Endian #endif @@ -77,11 +75,7 @@ runWebApp tlssettings h app observer = withSocketsDo $ do sockaddr <- fixSockAddr <$> getSocketName sock observer sockaddr where -#ifdef WITH_WEBAPP_SECURE go = (maybe runSettingsSocket (\ts -> runTLSSocket ts) tlssettings) -#else - go = runSettingsSocket -#endif fixSockAddr :: SockAddr -> SockAddr #ifdef __ANDROID__ @@ -165,25 +159,13 @@ webAppSessionBackend _ = do Just . Yesod.clientSessionBackend key . fst <$> Yesod.clientSessionDateCacher timeout -#ifdef WITH_WEBAPP_SECURE type AuthToken = SecureMem -#else -type AuthToken = T.Text -#endif toAuthToken :: T.Text -> AuthToken -#ifdef WITH_WEBAPP_SECURE toAuthToken = secureMemFromByteString . TE.encodeUtf8 -#else -toAuthToken = id -#endif fromAuthToken :: AuthToken -> T.Text -#ifdef WITH_WEBAPP_SECURE fromAuthToken = TE.decodeLatin1 . toBytes -#else -fromAuthToken = id -#endif {- Generates a random sha2_512 string, encapsulated in a SecureMem, - suitable to be used for an authentication secret. -} |