summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-08-04 21:03:38 -0400
committerjoe <joe@jerkface.net>2014-08-04 21:03:38 -0400
commitef5631f8e90ed30fedc3e1dc2d2bb5f882fee183 (patch)
tree6134c2c040a6344f32e29012edf2ff928414cffa /kiki.hs
parent7c4f8244594d14f3564b820f1ada264099840941 (diff)
KnownHosts encode/decode
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/kiki.hs b/kiki.hs
index 98ac4c7..c00ab84 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -224,7 +224,8 @@ modifyUID other = other
224readPublicKey :: Char8.ByteString -> RSAPublicKey 224readPublicKey :: Char8.ByteString -> RSAPublicKey
225readPublicKey bs = RSAKey (MPI n) (MPI e) 225readPublicKey bs = RSAKey (MPI n) (MPI e)
226 where 226 where
227 (n,e) = SSH.blobkey bs 227 (n,e) = fromMaybe (error "Unsupported key format")
228 $ SSH.blobkey bs
228 229
229-- | Returns the given list with its last element modified. 230-- | Returns the given list with its last element modified.
230toLast :: (x -> x) -> [x] -> [x] 231toLast :: (x -> x) -> [x] -> [x]