summaryrefslogtreecommitdiff
path: root/ymir/mlmmj-expose.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-02 03:06:38 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-02 03:06:38 +0200
commit2d6f8a8388eb7a286218e6371583587aeeddd2cc (patch)
tree7db2ddc0f5f79732881c4fcc00ca157fd03a7389 /ymir/mlmmj-expose.nix
parentf966519df0657b57d74df3d0add18b148a032023 (diff)
downloadnixos-2d6f8a8388eb7a286218e6371583587aeeddd2cc.tar
nixos-2d6f8a8388eb7a286218e6371583587aeeddd2cc.tar.gz
nixos-2d6f8a8388eb7a286218e6371583587aeeddd2cc.tar.bz2
nixos-2d6f8a8388eb7a286218e6371583587aeeddd2cc.tar.xz
nixos-2d6f8a8388eb7a286218e6371583587aeeddd2cc.zip
typos
Diffstat (limited to 'ymir/mlmmj-expose.nix')
-rw-r--r--ymir/mlmmj-expose.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index ad015f4e..df1374ae 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -36,7 +36,7 @@ let
36 args <- getArgs 36 args <- getArgs
37 case args of 37 case args of
38 [listDir, rawExtension] -> do 38 [listDir, rawExtension] -> do
39 extension <- LCBS.pack <$> unhex rawExtension 39 extension <- CLBS.pack <$> unhex rawExtension
40 setCurrentDirectory listDir 40 setCurrentDirectory listDir
41 key <- (BS.readFile "exposed.key") `catchIOError` (\e -> if isDoesNotExistError e then randomKey >>= (\k -> BS.writeFile "exposed.key" k >> return k) else ioError e) 41 key <- (BS.readFile "exposed.key") `catchIOError` (\e -> if isDoesNotExistError e then randomKey >>= (\k -> BS.writeFile "exposed.key" k >> return k) else ioError e)
42 let ((map toLower -> ident), (map toLower -> recipient)) = read . CLBS.unpack $ decryptMsg CBC key extension 42 let ((map toLower -> ident), (map toLower -> recipient)) = read . CLBS.unpack $ decryptMsg CBC key extension
@@ -68,7 +68,7 @@ let
68 subscribers <- getSubscribers 68 subscribers <- getSubscribers
69 forM_ recipients (\recipient -> do { 69 forM_ recipients (\recipient -> do {
70 unless (recipient `elem` subscribers) . die $ "Unknown recipient: ‘" ++ recipient ++ "’"; 70 unless (recipient `elem` subscribers) . die $ "Unknown recipient: ‘" ++ recipient ++ "’";
71 encryptMsg CBC key (CLBS.pack . show $ (ident, recipient)) >>= putStrLn . (\ext -> takeFileName listDir ++ "+" ++ ext ++ "@subs.lists.yggdrasil.li") . hex . LCBS.unpack; 71 encryptMsg CBC key (CLBS.pack . show $ (ident, recipient)) >>= putStrLn . (\ext -> takeFileName listDir ++ "+" ++ ext ++ "@subs.lists.yggdrasil.li") . hex . CLBS.unpack;
72 }) 72 })
73 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <senderIdentity> [<recipient> [...]])") >> exitWith (ExitFailure 2) 73 _ -> hPutStrLn stderr ("Called without expected arguments (<listDirectory> <senderIdentity> [<recipient> [...]])") >> exitWith (ExitFailure 2)
74 _ -> hPutStrLn stderr ("Called under unsupported name ‘" ++ progName ++ "’") >> exitWith (ExitFailure 2) 74 _ -> hPutStrLn stderr ("Called under unsupported name ‘" ++ progName ++ "’") >> exitWith (ExitFailure 2)