Support reading and writing ED25519 SSH keys.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use base64::DecodeError;
|
||||
use ed25519::ED25519PublicImportError;
|
||||
use std::io;
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -37,6 +38,15 @@ impl From<io::Error> for SSHKeyParseError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ED25519PublicImportError> for SSHKeyParseError {
|
||||
fn from(e: ED25519PublicImportError) -> SSHKeyParseError {
|
||||
match e {
|
||||
ED25519PublicImportError::WrongNumberOfBytes(_) =>
|
||||
SSHKeyParseError::InvalidPublicKeyMaterial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum SSHKeyRenderError {
|
||||
IOError(io::Error),
|
||||
|
||||
Reference in New Issue
Block a user