summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-01-24 16:22:32 -0500
committerAndrew Cady <d@jerkface.net>2016-01-24 19:47:45 -0500
commit90b9dc94d3d0c4cb13cb5e6e400ed1012747e6ff (patch)
tree86c63e86ec498a9be6a0bab270e5803f9fa3a0f4 /src
parentc4b9b52a2ebbc8d113f4829c86834dcd565cd6a3 (diff)
fix warnings
Diffstat (limited to 'src')
-rw-r--r--src/Network/ACME.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/ACME.hs b/src/Network/ACME.hs
index d2216ac..5ae12f3 100644
--- a/src/Network/ACME.hs
+++ b/src/Network/ACME.hs
@@ -93,12 +93,12 @@ extractCR r = do
93 (filtered . has $ ix "type" . only "http-01") 93 (filtered . has $ ix "type" . only "http-01")
94 94
95 token = r ^?! httpChallenge . JSON.key "token" . _String . to encodeUtf8 95 token = r ^?! httpChallenge . JSON.key "token" . _String . to encodeUtf8
96 crUri = r ^?! httpChallenge . JSON.key "uri" . _String . to T.unpack 96 nextU = r ^?! httpChallenge . JSON.key "uri" . _String . to T.unpack
97 97
98 thumb = thumbprint (JWK (rsaE pub) "RSA" (rsaN pub)) 98 thumb = thumbprint (JWK (rsaE pub) "RSA" (rsaN pub))
99 thumbtoken = toStrict (LB.fromChunks [token, ".", thumb]) 99 thumbtoken = toStrict (LB.fromChunks [token, ".", thumb])
100 100
101 return $ ChallengeRequest crUri token thumbtoken 101 return $ ChallengeRequest nextU token thumbtoken
102 102
103ncErrorReport :: (Show body, AsValue body, MonadIO m) => Response body -> m () 103ncErrorReport :: (Show body, AsValue body, MonadIO m) => Response body -> m ()
104ncErrorReport r = 104ncErrorReport r =
@@ -121,7 +121,7 @@ retrieveCert :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => CSR -> m (
121retrieveCert input = sendPayload _newCert (csr $ coerce input) 121retrieveCert input = sendPayload _newCert (csr $ coerce input)
122 122
123notifyChallenge :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> ByteString -> m (Response LC.ByteString) 123notifyChallenge :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> ByteString -> m (Response LC.ByteString)
124notifyChallenge crUri thumbtoken = sendPayload (const crUri) (challenge thumbtoken) 124notifyChallenge uri thumbtoken = sendPayload (const uri) (challenge thumbtoken)
125 125
126data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session } 126data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session }
127 127