From daff3fe8911cc486c8001db6353a936816db7830 Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 28 Apr 2014 18:01:24 -0400 Subject: added KF_Authentic/KF_Subkeys usage to kiki call to pave the way for obsoleting kImports. --- kiki.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kiki.hs b/kiki.hs index d9e12b6..93b9d7a 100644 --- a/kiki.hs +++ b/kiki.hs @@ -834,13 +834,20 @@ sync bExport bImport bSecret cmdarg args_raw = do return $ \rt kd -> Just () importifauth_f = do Map.lookup "--import-if-authentic" margs return guardAuthentic + pubfill = maybe KF_Subkeys id + $ mplus import_f importifauth_f + where + import_f = fmap (const KF_All) + $ Map.lookup "--import" margs + importifauth_f = fmap (const KF_Authentic) + $ Map.lookup "--import-if-authentic" margs buildStreamInfo rtyp ftyp = StreamInfo { typ = ftyp, fill = rtyp } kikiOp = KeyRingOperation { kFiles = Map.fromList $ [ ( HomeSec, buildStreamInfo (if bSecret && bImport then KF_All else KF_None) (KeyRingFile passfd) ) - , ( HomePub, buildStreamInfo (if bImport then KF_All + , ( HomePub, buildStreamInfo (if bImport then pubfill else KF_None) (KeyRingFile Nothing) ) ] -- cgit v1.2.3