finish off ecdsa

This commit is contained in:
nora 2024-08-26 19:18:45 +02:00
parent 06c1f31dca
commit d5794d3ef0
12 changed files with 582 additions and 542 deletions

View file

@ -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;

View file

@ -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 {