mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
Get rid of the deprecated OpenSSL API
It turns out there is a way to get the uncompressed format from the low-level API, which is not (yet?) deprecated so this removes all of the TODO's for ECDSA keys and moves the EC_KEY structure in the high-level EVP_PKEY. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -176,13 +176,9 @@ void crypto_free(struct ssh_crypto_struct *crypto)
|
||||
#ifdef HAVE_ECDH
|
||||
SAFE_FREE(crypto->ecdh_client_pubkey);
|
||||
SAFE_FREE(crypto->ecdh_server_pubkey);
|
||||
if(crypto->ecdh_privkey != NULL){
|
||||
if (crypto->ecdh_privkey != NULL) {
|
||||
#ifdef HAVE_OPENSSL_ECC
|
||||
/* TODO Change to new API when the OpenSSL will support export of uncompressed EC keys
|
||||
* https://github.com/openssl/openssl/pull/16624
|
||||
* #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
*/
|
||||
#if 1
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
EC_KEY_free(crypto->ecdh_privkey);
|
||||
#else
|
||||
EVP_PKEY_free(crypto->ecdh_privkey);
|
||||
|
||||
Reference in New Issue
Block a user