mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 12:50:30 +09:00
Use EVP_PKEY as a key type in key structs
Merge multiple key variables into one variable. Signed-off-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
7792d38157
commit
a9dddd89aa
@@ -178,7 +178,15 @@ void crypto_free(struct ssh_crypto_struct *crypto)
|
||||
SAFE_FREE(crypto->ecdh_server_pubkey);
|
||||
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
|
||||
EC_KEY_free(crypto->ecdh_privkey);
|
||||
#else
|
||||
EVP_PKEY_free(crypto->ecdh_privkey);
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
#elif defined HAVE_GCRYPT_ECC
|
||||
gcry_sexp_release(crypto->ecdh_privkey);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user