diff options
author | joe <joe@jerkface.net> | 2014-04-28 18:01:24 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-28 18:01:24 -0400 |
commit | daff3fe8911cc486c8001db6353a936816db7830 (patch) | |
tree | 398d984977a8061b7abed16b8b0e83d68d2dbe9b /kiki.hs | |
parent | 67e72b1bcb9cf4a4d1bcfde6a3f87ed2dc2ff209 (diff) |
added KF_Authentic/KF_Subkeys usage to kiki call to pave the
way for obsoleting kImports.
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -834,13 +834,20 @@ sync bExport bImport bSecret cmdarg args_raw = do | |||
834 | return $ \rt kd -> Just () | 834 | return $ \rt kd -> Just () |
835 | importifauth_f = do Map.lookup "--import-if-authentic" margs | 835 | importifauth_f = do Map.lookup "--import-if-authentic" margs |
836 | return guardAuthentic | 836 | return guardAuthentic |
837 | pubfill = maybe KF_Subkeys id | ||
838 | $ mplus import_f importifauth_f | ||
839 | where | ||
840 | import_f = fmap (const KF_All) | ||
841 | $ Map.lookup "--import" margs | ||
842 | importifauth_f = fmap (const KF_Authentic) | ||
843 | $ Map.lookup "--import-if-authentic" margs | ||
837 | buildStreamInfo rtyp ftyp = StreamInfo { typ = ftyp, fill = rtyp } | 844 | buildStreamInfo rtyp ftyp = StreamInfo { typ = ftyp, fill = rtyp } |
838 | kikiOp = KeyRingOperation | 845 | kikiOp = KeyRingOperation |
839 | { kFiles = Map.fromList $ | 846 | { kFiles = Map.fromList $ |
840 | [ ( HomeSec, buildStreamInfo (if bSecret && bImport then KF_All | 847 | [ ( HomeSec, buildStreamInfo (if bSecret && bImport then KF_All |
841 | else KF_None) | 848 | else KF_None) |
842 | (KeyRingFile passfd) ) | 849 | (KeyRingFile passfd) ) |
843 | , ( HomePub, buildStreamInfo (if bImport then KF_All | 850 | , ( HomePub, buildStreamInfo (if bImport then pubfill |
844 | else KF_None) | 851 | else KF_None) |
845 | (KeyRingFile Nothing) ) | 852 | (KeyRingFile Nothing) ) |
846 | ] | 853 | ] |