mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 17:05:05 +01:00
misc improvements
This commit is contained in:
parent
ca4213ba81
commit
26cdcd0524
7 changed files with 39 additions and 31 deletions
|
|
@ -110,7 +110,7 @@ impl AlgorithmName for EncryptionAlgorithm {
|
|||
pub struct EncodedSshSignature(pub Vec<u8>);
|
||||
|
||||
pub struct HostKeySigningAlgorithm {
|
||||
private_key: PrivateKey,
|
||||
private_key: Box<PrivateKey>,
|
||||
}
|
||||
|
||||
impl AlgorithmName for HostKeySigningAlgorithm {
|
||||
|
|
@ -121,7 +121,9 @@ impl AlgorithmName for HostKeySigningAlgorithm {
|
|||
|
||||
impl HostKeySigningAlgorithm {
|
||||
pub fn new(private_key: PrivateKey) -> Self {
|
||||
Self { private_key }
|
||||
Self {
|
||||
private_key: Box::new(private_key),
|
||||
}
|
||||
}
|
||||
pub fn sign(&self, data: &[u8]) -> Signature {
|
||||
self.private_key.sign(data)
|
||||
|
|
|
|||
|
|
@ -145,8 +145,9 @@ impl ServerConnection {
|
|||
let kex_algorithm = sup_algs.key_exchange.find(kex.kex_algorithms.0)?;
|
||||
debug!(name = %kex_algorithm.name(), "Using KEX algorithm");
|
||||
|
||||
let server_host_key_algorithm =
|
||||
sup_algs.hostkey_sign.find(kex.server_host_key_algorithms.0)?;
|
||||
let server_host_key_algorithm = sup_algs
|
||||
.hostkey_sign
|
||||
.find(kex.server_host_key_algorithms.0)?;
|
||||
debug!(name = %server_host_key_algorithm.name(), "Using host key algorithm");
|
||||
|
||||
// TODO: Implement aes128-ctr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue