mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-14 16:35:06 +01:00
finish off ecdsa
This commit is contained in:
parent
06c1f31dca
commit
d5794d3ef0
12 changed files with 582 additions and 542 deletions
|
|
@ -1,7 +1,10 @@
|
|||
pub mod encrypt;
|
||||
|
||||
use cluelessh_format::{Reader, Writer};
|
||||
use cluelessh_keys::{public::PublicKey, PlaintextPrivateKey, PrivateKey};
|
||||
use cluelessh_keys::{
|
||||
private::{PlaintextPrivateKey, PrivateKey},
|
||||
public::PublicKey,
|
||||
};
|
||||
use p256::ecdsa::signature::Signer;
|
||||
use sha2::Digest;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ pub struct ServerConnection {
|
|||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct ServerConfig {
|
||||
pub host_keys: Vec<cluelessh_keys::PlaintextPrivateKey>,
|
||||
pub host_keys: Vec<cluelessh_keys::private::PlaintextPrivateKey>,
|
||||
}
|
||||
|
||||
enum ServerState {
|
||||
|
|
@ -355,12 +355,15 @@ impl ServerConnection {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use hex_literal::hex;
|
||||
|
||||
use crate::{packet::MsgKind, server::{ServerConfig, ServerConnection}, SshRng};
|
||||
use crate::{
|
||||
packet::MsgKind,
|
||||
server::{ServerConfig, ServerConnection},
|
||||
SshRng,
|
||||
};
|
||||
|
||||
struct NoRng;
|
||||
impl SshRng for NoRng {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue