From c54b35e665f2a8ec2fff484de99fd59b0454dcff Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Mon, 15 Jul 2019 18:45:45 -0400 Subject: Switched fingerprint to wrapped ByteString + some module shuffling. --- lib/KeyRing/BuildKeyDB.hs | 6 +++--- lib/KeyRing/Types.hs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/KeyRing') diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs index 0eddc51..587d812 100644 --- a/lib/KeyRing/BuildKeyDB.hs +++ b/lib/KeyRing/BuildKeyDB.hs @@ -127,7 +127,7 @@ buildKeyDB ctx grip0 keyring = do ringPackets <- Map.traverseWithKey readp ringMap let _ = ringPackets :: Map.Map InputFile (StreamInfo, Message) - let grip = grip0 `mplus` (fingerprint <$> fstkey) + let grip = grip0 `mplus` (show . fingerprint <$> fstkey) where fstkey = do (_,Message ps) <- Map.lookup HomeSec ringPackets @@ -691,7 +691,7 @@ insertSubkey transcode kk (KeyData top topsigs uids subs) tags inputfile key0 = sig_ov <- pgpSign (Message [wkun]) tor_ov SHA1 - (fingerprint wkun) + (show $ fingerprint wkun) flip (maybe $ return $ KikiSuccess (uids,[(fname, WarnFailedToMakeSignature)])) (sig_ov >>= listToMaybe . signatures_over) $ \sig -> do @@ -1216,7 +1216,7 @@ fingerdress :: Packet -> SockAddr fingerdress topk = fromMaybe zero $ Hosts.inet_pton addr_str where zero = SockAddrInet 0 0 - addr_str = colons $ "fd" ++ drop 10 (map toLower $ fingerprint topk) + addr_str = colons $ "fd" ++ drop 10 (map toLower $ show $ fingerprint topk) colons (a:b:c:d:xs@(_:_)) = [a,b,c,d,':'] ++ colons xs colons xs = xs diff --git a/lib/KeyRing/Types.hs b/lib/KeyRing/Types.hs index 4a0b34e..5318b31 100644 --- a/lib/KeyRing/Types.hs +++ b/lib/KeyRing/Types.hs @@ -350,7 +350,7 @@ isTrust _ = False -- matchpr fp = Data.List.Extra.takeEnd (length fp) -- matchpr :: String -> Packet -> String -matchpr fp k = reverse $ zipWith const (reverse (fingerprint k)) fp +matchpr fp k = reverse $ zipWith const (reverse (show $ fingerprint k)) fp -- cgit v1.2.3