diff options
author | joe <joe@jerkface.net> | 2014-04-18 02:40:44 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-18 02:40:44 -0400 |
commit | c076fedc82c85b47979dafe4d796de47b6d7c120 (patch) | |
tree | 6d1356ef81d437f7eb1b40f81ab003d04789796c /kiki.hs | |
parent | fe843ba53242e1f4ee7f7b14f0046b170db538bc (diff) |
support for --import-if-authentic and --import
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1334,6 +1334,14 @@ main = do | |||
1334 | wallets | 1334 | wallets |
1335 | rings = map (\fname -> (ArgFile fname, (MutableRef Nothing, KeyRingFile passfd))) | 1335 | rings = map (\fname -> (ArgFile fname, (MutableRef Nothing, KeyRingFile passfd))) |
1336 | keyrings_ | 1336 | keyrings_ |
1337 | importStyle = maybe (\_ _ -> subkeysOnly) | ||
1338 | (\f rt kd -> f rt kd >> importPublic) | ||
1339 | $ mplus import_f importifauth_f | ||
1340 | where | ||
1341 | import_f = do Map.lookup "--import" margs | ||
1342 | return $ \rt kd -> Just () | ||
1343 | importifauth_f = do Map.lookup "--import-if-authentic" margs | ||
1344 | return guardAuthentic | ||
1337 | kikiOp = KeyRingData | 1345 | kikiOp = KeyRingData |
1338 | { kFiles = Map.fromList $ | 1346 | { kFiles = Map.fromList $ |
1339 | [ ( HomeSec, (MutableRef Nothing, KeyRingFile passfd) ) | 1347 | [ ( HomeSec, (MutableRef Nothing, KeyRingFile passfd) ) |
@@ -1342,7 +1350,8 @@ main = do | |||
1342 | ++ rings | 1350 | ++ rings |
1343 | ++ pems | 1351 | ++ pems |
1344 | ++ walts | 1352 | ++ walts |
1345 | , kImports = Map.empty | 1353 | , kImports = Map.fromList $ |
1354 | [ ( HomePub, importStyle ) ] | ||
1346 | , homeSpec = homespec | 1355 | , homeSpec = homespec |
1347 | } | 1356 | } |
1348 | 1357 | ||