summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/KeyRing.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 84d484d..c7fcebc 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -1983,7 +1983,7 @@ ifSecret _ t f = f
1983showPacket :: Packet -> String 1983showPacket :: Packet -> String
1984showPacket p | isKey p = (if is_subkey p 1984showPacket p | isKey p = (if is_subkey p
1985 then showPacket0 p 1985 then showPacket0 p
1986 else ifSecret p "----Secret-----" "----Public-----") 1986 else ifSecret p "---Secret" "---Public")
1987 ++ " "++fingerprint p 1987 ++ " "++fingerprint p
1988 ++ " "++show (key_algorithm p) 1988 ++ " "++show (key_algorithm p)
1989 ++ case key_nbits p of { 0 -> ""; n -> "("++show n++")" } 1989 ++ case key_nbits p of { 0 -> ""; n -> "("++show n++")" }
@@ -2004,7 +2004,12 @@ showPacket p | isKey p = (if is_subkey p
2004 xs = hashed_subpackets p 2004 xs = hashed_subpackets p
2005 2005
2006 2006
2007showPacket0 p = concat . take 1 $ words (show p) 2007showPacket0 p = dropSuffix "Packet" . concat . take 1 $ words (show p)
2008 where
2009 dropSuffix :: String -> String -> String
2010 dropSuffix _ [] = ""
2011 dropSuffix suff (x:xs) | (x:xs)==suff = ""
2012 | otherwise = x:dropSuffix suff xs
2008 2013
2009 2014
2010-- | returns Just True so as to indicate that 2015-- | returns Just True so as to indicate that