Skip to content

Commit

Permalink
Reformat codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo1003 committed Aug 22, 2022
1 parent 788b33d commit 84c8a22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/keys/ed25519.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::{Key, PrivateParts, PublicParts};
use crate::error::{Error, ErrorKind, OsshResult};
use crate::format::ossh_pubkey::*;
use openssl::pkey::{PKey, Private, Public, Id};
use openssl::pkey::{Id, PKey, Private, Public};
#[rustfmt::skip]
use ed25519_dalek::{
Keypair as DalekKeypair,
Expand Down
8 changes: 6 additions & 2 deletions src/keys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ impl PublicKey {
}
Id::DSA => Ok(dsa::DsaPublicKey::from_ossl_dsa(pkey.dsa()?).into()),
Id::EC => Ok(ecdsa::EcDsaPublicKey::from_ossl_ec(pkey.ec_key()?)?.into()),
Id::ED25519 => Ok(ed25519::Ed25519PublicKey::from_ossl_ed25519(&pkey.raw_public_key()?)?.into()),
Id::ED25519 => {
Ok(ed25519::Ed25519PublicKey::from_ossl_ed25519(&pkey.raw_public_key()?)?.into())
}
_ => Err(ErrorKind::UnsupportType.into()),
}
}
Expand Down Expand Up @@ -270,7 +272,9 @@ impl KeyPair {
}
Id::DSA => Ok(dsa::DsaKeyPair::from_ossl_dsa(pkey.dsa()?).into()),
Id::EC => Ok(ecdsa::EcDsaKeyPair::from_ossl_ec(pkey.ec_key()?)?.into()),
Id::ED25519 => Ok(ed25519::Ed25519KeyPair::from_ossl_ed25519(&pkey.raw_private_key()?)?.into()),
Id::ED25519 => {
Ok(ed25519::Ed25519KeyPair::from_ossl_ed25519(&pkey.raw_private_key()?)?.into())
}
_ => Err(ErrorKind::UnsupportType.into()),
}
}
Expand Down

0 comments on commit 84c8a22

Please sign in to comment.