diff options
author | Andrew Cady <d@jerkface.net> | 2017-03-02 02:30:06 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-03-02 02:30:06 -0500 |
commit | 05ff2589616685ce00271e96865c99de0edc8c99 (patch) | |
tree | 03ecc3e8b03034c20bc70cba262cac47d402c104 | |
parent | 3b63031cf24c24559b22ebfef3962a382566d481 (diff) |
update to lts-8.3
-rw-r--r-- | acme-certify.hs | 3 | ||||
-rw-r--r-- | src/Network/ACME.hs | 6 | ||||
-rw-r--r-- | stack.yaml | 21 |
3 files changed, 8 insertions, 22 deletions
diff --git a/acme-certify.hs b/acme-certify.hs index 6cb3c05..c7a8279 100644 --- a/acme-certify.hs +++ b/acme-certify.hs | |||
@@ -5,6 +5,7 @@ | |||
5 | {-# LANGUAGE NamedFieldPuns #-} | 5 | {-# LANGUAGE NamedFieldPuns #-} |
6 | {-# LANGUAGE NoImplicitPrelude #-} | 6 | {-# LANGUAGE NoImplicitPrelude #-} |
7 | {-# LANGUAGE OverloadedStrings #-} | 7 | {-# LANGUAGE OverloadedStrings #-} |
8 | {-# LANGUAGE PackageImports #-} | ||
8 | {-# LANGUAGE RecordWildCards #-} | 9 | {-# LANGUAGE RecordWildCards #-} |
9 | {-# LANGUAGE ScopedTypeVariables #-} | 10 | {-# LANGUAGE ScopedTypeVariables #-} |
10 | {-# LANGUAGE TypeSynonymInstances #-} | 11 | {-# LANGUAGE TypeSynonymInstances #-} |
@@ -27,7 +28,7 @@ import Data.Text (Text, pack, unpack) | |||
27 | import Data.Text.Encoding (decodeUtf8, encodeUtf8) | 28 | import Data.Text.Encoding (decodeUtf8, encodeUtf8) |
28 | import Data.Time.Clock | 29 | import Data.Time.Clock |
29 | import Data.Yaml (Object) | 30 | import Data.Yaml (Object) |
30 | import qualified Data.Yaml.Config as Config | 31 | import qualified "yaml-config" Data.Yaml.Config as Config |
31 | import Data.Yaml.Config.Internal (Config (..)) | 32 | import Data.Yaml.Config.Internal (Config (..)) |
32 | import Network.ACME (HttpProvisioner, Keys (..), | 33 | import Network.ACME (HttpProvisioner, Keys (..), |
33 | canProvision, certify, | 34 | canProvision, certify, |
diff --git a/src/Network/ACME.hs b/src/Network/ACME.hs index 4b96afc..5ea6ff8 100644 --- a/src/Network/ACME.hs +++ b/src/Network/ACME.hs | |||
@@ -35,7 +35,7 @@ import Network.Connection | |||
35 | import Network.HTTP.Conduit (Manager, mkManagerSettings, | 35 | import Network.HTTP.Conduit (Manager, mkManagerSettings, |
36 | newManager) | 36 | newManager) |
37 | import Network.URI | 37 | import Network.URI |
38 | import Network.Wreq (Response, checkStatus, defaults, | 38 | import Network.Wreq (Response, checkResponse, defaults, |
39 | responseBody, responseHeader, | 39 | responseBody, responseHeader, |
40 | responseStatus, statusCode, | 40 | responseStatus, statusCode, |
41 | statusMessage) | 41 | statusMessage) |
@@ -168,8 +168,8 @@ post url payload = do | |||
168 | put $ r ^?! responseHeader "Replay-Nonce" . to (Nonce . T.unpack . decodeUtf8) | 168 | put $ r ^?! responseHeader "Replay-Nonce" . to (Nonce . T.unpack . decodeUtf8) |
169 | return r | 169 | return r |
170 | where | 170 | where |
171 | noStatusCheck = defaults & checkStatus .~ Just nullChecker | 171 | noStatusCheck = defaults & checkResponse .~ Just nullChecker |
172 | nullChecker _ _ _ = Nothing | 172 | nullChecker _ _ = return () |
173 | 173 | ||
174 | sendPayload :: (MonadIO m, MonadState Nonce m, MonadReader Env m) => (Directory -> String) -> ByteString -> m (Response LC.ByteString) | 174 | sendPayload :: (MonadIO m, MonadState Nonce m, MonadReader Env m) => (Directory -> String) -> ByteString -> m (Response LC.ByteString) |
175 | sendPayload reqType payload = do | 175 | sendPayload reqType payload = do |
@@ -1,14 +1,14 @@ | |||
1 | # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md | 1 | # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md |
2 | 2 | ||
3 | # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) | 3 | # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) |
4 | resolver: lts-5.0 | 4 | resolver: lts-8.3 |
5 | 5 | ||
6 | # Local packages, usually specified by relative directory name | 6 | # Local packages, usually specified by relative directory name |
7 | packages: | 7 | packages: |
8 | - '.' | 8 | - '.' |
9 | - location: | 9 | - location: |
10 | git: git@github.com:afcady/HSOpenSSL.git | 10 | git: git@github.com:afcady/HSOpenSSL.git |
11 | commit: 90679fb0e20514f915c90c0e27774867a30915df | 11 | commit: 99fc8cd8e1906c8e4426c51ecb32d3a04fd08a30 |
12 | extra-dep: true | 12 | extra-dep: true |
13 | - location: | 13 | - location: |
14 | git: git@github.com:afcady/email-validate-hs.git | 14 | git: git@github.com:afcady/email-validate-hs.git |
@@ -20,26 +20,11 @@ extra-deps: | |||
20 | - yaml-config-0.3.0 | 20 | - yaml-config-0.3.0 |
21 | - failure-0.2.0.3 | 21 | - failure-0.2.0.3 |
22 | - posix-escape-0.1 | 22 | - posix-escape-0.1 |
23 | - wreq-0.5.0.0 | ||
23 | 24 | ||
24 | # Override default flag values for local packages and extra-deps | 25 | # Override default flag values for local packages and extra-deps |
25 | flags: | 26 | flags: |
26 | HsOpenSSL: | 27 | HsOpenSSL: |
27 | fast-bignum: false | 28 | fast-bignum: false |
28 | 29 | ||
29 | # Extra package databases containing global packages | ||
30 | extra-package-dbs: [] | 30 | extra-package-dbs: [] |
31 | |||
32 | # Control whether we use the GHC we find on the path | ||
33 | # system-ghc: true | ||
34 | |||
35 | # Require a specific version of stack, using version ranges | ||
36 | # require-stack-version: -any # Default | ||
37 | # require-stack-version: >= 1.0.0 | ||
38 | |||
39 | # Override the architecture used by stack, especially useful on Windows | ||
40 | # arch: i386 | ||
41 | # arch: x86_64 | ||
42 | |||
43 | # Extra directories used by stack for building | ||
44 | # extra-include-dirs: [/path/to/dir] | ||
45 | # extra-lib-dirs: [/path/to/dir] | ||