summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-05-19 14:38:42 -0400
committerjoe <joe@jerkface.net>2014-05-19 14:38:42 -0400
commitc4eb57db255580737ed9f75ffcbbc4db7e4b073f (patch)
tree7f40816f08165b77af30f61c4f7583e4afefa6a7
parent032b8393de4f9da40c18c336348fa5bc96588d2c (diff)
more debug print tweeks
-rw-r--r--validatecert.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/validatecert.hs b/validatecert.hs
index efbf84a..1871b24 100644
--- a/validatecert.hs
+++ b/validatecert.hs
@@ -115,12 +115,15 @@ main = do
115 wlog $ "ParseError on \"" <> toS request <> "\"\n" 115 wlog $ "ParseError on \"" <> toS request <> "\"\n"
116 when debug $ do 116 when debug $ do
117 wlog $ "Parse result:\n" 117 wlog $ "Parse result:\n"
118 wlog $ "\tFOUND host:" <> vrHostname req <> "\n" 118 wlog $ "\tHOST: " <> vrHostname req <> "\n"
119 let estr = S.intercalate " , " $ map showe $ Map.elems $ vrErrors req 119 maybe (return ())
120 (\certid -> wlog $ "\tCERT: " <> certid <> "\n")
121 $ vrPeerCertId req
122 let estr = S.intercalate "," $ map showe $ Map.elems $ vrErrors req
120 showe e = veName e <> "/" <> veCert e 123 showe e = veName e <> "/" <> veCert e
121 wlog $ "\tFOUND ERRORS:" <> estr <> "\n" 124 wlog $ "\tERRORS: " <> estr <> "\n"
122 forM_ (Map.toList $ vrCerts req) $ \(key,cert) -> do 125 forM_ (Map.toList $ vrCerts req) $ \(key,cert) -> do
123 wlog $ "\tFOUND cert " <> key <> ": " <> certSubject cert <> "\n" 126 wlog $ "\tCHAIN " <> key <> ": " <> certSubject cert <> "\n"
124 let responseErrors = fmap (\ve -> ve { veReason = "Checked by validatecert.hs" }) $ vrErrors req 127 let responseErrors = fmap (\ve -> ve { veReason = "Checked by validatecert.hs" }) $ vrErrors req
125 response0 = createResponse req responseErrors 128 response0 = createResponse req responseErrors
126 len = bshow $ S.length response0 129 len = bshow $ S.length response0