From bcf603a5ebdfc5925ccfd928cbea5c4266f7efaf Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 5 May 2020 19:29:57 -0400 Subject: fix cryptonomic.net URL, avoid use of SHA-1 --- lib/Kiki.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Kiki.hs') diff --git a/lib/Kiki.hs b/lib/Kiki.hs index 02ac397..870bbba 100644 --- a/lib/Kiki.hs +++ b/lib/Kiki.hs @@ -580,8 +580,8 @@ sshKeyToHostname sshkey = do case rsaKeyFromPacket sshkey of Just (RSAKey (MPI n) (MPI e)) -> do let blob = SSH.sshrsa e n - sha1 = C.hashlazy blob :: C.Digest C.SHA1 - Char8.fromStrict (convertToBase Base16 sha1) <> ".ssh-rsa.cryptonomic.net" + sum = C.hashlazy blob :: C.Digest C.SHA256 + Char8.fromStrict (convertToBase Base16 sum) <> ".ssh-rsa.cryptonomic.net" Nothing -> "" peerConnectionName :: Peer -> Char8.ByteString -- cgit v1.2.3