mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 12:50:30 +09:00
Fix build with missing openssl/ecdh.h
This commit is contained in:
6
src/dh.c
6
src/dh.c
@@ -681,10 +681,12 @@ int make_sessionid(ssh_session session) {
|
||||
}
|
||||
|
||||
ssh_string_free(num);
|
||||
} else if (session->next_crypto->kex_type == SSH_KEX_ECDH_SHA2_NISTP256){
|
||||
#ifdef HAVE_ECDH
|
||||
} else if (session->next_crypto->kex_type == SSH_KEX_ECDH_SHA2_NISTP256){
|
||||
buffer_add_ssh_string(buf,session->next_crypto->ecdh_client_pubkey);
|
||||
buffer_add_ssh_string(buf,session->next_crypto->ecdh_server_pubkey);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
num = make_bignum_string(session->next_crypto->k);
|
||||
if (num == NULL) {
|
||||
goto error;
|
||||
|
||||
@@ -111,8 +111,10 @@ void crypto_free(struct ssh_crypto_struct *crypto){
|
||||
bignum_free(crypto->x);
|
||||
bignum_free(crypto->y);
|
||||
bignum_free(crypto->k);
|
||||
#ifdef HAVE_ECDH
|
||||
SAFE_FREE(crypto->ecdh_client_pubkey);
|
||||
SAFE_FREE(crypto->ecdh_server_pubkey);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_LIBZ
|
||||
if (crypto->compress_out_ctx &&
|
||||
|
||||
Reference in New Issue
Block a user