diff options
author | joe <joe@jerkface.net> | 2014-08-04 21:03:38 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-08-04 21:03:38 -0400 |
commit | ef5631f8e90ed30fedc3e1dc2d2bb5f882fee183 (patch) | |
tree | 6134c2c040a6344f32e29012edf2ff928414cffa /kiki.hs | |
parent | 7c4f8244594d14f3564b820f1ada264099840941 (diff) |
KnownHosts encode/decode
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -224,7 +224,8 @@ modifyUID other = other | |||
224 | readPublicKey :: Char8.ByteString -> RSAPublicKey | 224 | readPublicKey :: Char8.ByteString -> RSAPublicKey |
225 | readPublicKey bs = RSAKey (MPI n) (MPI e) | 225 | readPublicKey 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. |
230 | toLast :: (x -> x) -> [x] -> [x] | 231 | toLast :: (x -> x) -> [x] -> [x] |