From 467ec8e58ca8b13074ac64ab85cd9e84c492f167 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 31 Oct 2013 00:44:52 -0400 Subject: Reduce claimants: debug print --- keys.hs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/keys.hs b/keys.hs index f8f1e2b..3ce3980 100644 --- a/keys.hs +++ b/keys.hs @@ -380,7 +380,9 @@ listKeysFiltered grips pkts = do -- torhash = maybe "" id $ derToBase32 <$> derRSA sub concat [ " " -- , grip top - , (if not (null claimants) then trace ("claimants: "++show claimants) else id) ar + , (if not (null claimants) + then trace ("claimants: "++show (map fingerprint claimants)) + else id) ar , formkind , " " , fingerprint sub @@ -733,6 +735,8 @@ data Arguments = , output :: FilePath } | PemFP { homedir :: Maybe FilePath , seckey :: String } + | CatPub { homedir :: Maybe FilePath + , catpub_args :: [String] } {- | Decrypt { homedir :: Maybe FilePath , passphrase_fd :: Maybe Int @@ -782,6 +786,9 @@ main = do [ "Remove password protection from the working keyring" , " and save the result into the given file."] -} + , CatPub HOMEOPTION + (def &= args &= typ "KEYSPEC FILES") + &= help "Extract a public subkey to stdout." , Add HOMEOPTION (def &= opt ("passphrase"::String) &= typ "FD" @@ -1023,6 +1030,12 @@ main = do -} -} + doCmd cmd@(CatPub {}) = do + let spec:files = catpub_args cmd + putStrLn $ "spec = " ++show spec + putStrLn $ "files = " ++ show files + return () + doCmd cmd@(Add {}) = do ( homedir -- e3ozbhvej4jvlu43.onion/gpg/gnupghome , sec -- e3ozbhvej4jvlu43.onion/gpg/gnupghome/secring.gpg -- cgit v1.2.3