1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

dh: Rename variables for DH key exchange

Rename and refactor how some variables are held in ssh_crypto_struct.
Refactor allocation of dh exchange public keys.

This is in preparation for switching the code to use openssl native DH
handling and allowed to better reason about the code and the overall API.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Simo Sorce
2019-03-12 18:24:36 -04:00
committed by Andreas Schneider
parent 997fe4d418
commit 2f38af1559
11 changed files with 195 additions and 140 deletions

View File

@@ -169,7 +169,7 @@ void crypto_free(struct ssh_crypto_struct *crypto)
ssh_key_free(crypto->server_pubkey);
ssh_dh_cleanup(crypto);
bignum_safe_free(crypto->k);
bignum_safe_free(crypto->shared_secret);
#ifdef HAVE_ECDH
SAFE_FREE(crypto->ecdh_client_pubkey);
SAFE_FREE(crypto->ecdh_server_pubkey);