mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
Change const bignum to bignum
Openssl3.0 API retrieves bignum variables from a key. 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
a9dddd89aa
commit
20c13a2c76
10
src/dh-gex.c
10
src/dh-gex.c
@@ -108,7 +108,11 @@ SSH_PACKET_CALLBACK(ssh_packet_client_dhgex_group)
|
||||
bignum pmin1 = NULL, one = NULL;
|
||||
bignum_CTX ctx = bignum_ctx_new();
|
||||
bignum modulus = NULL, generator = NULL;
|
||||
#if !defined(HAVE_LIBCRYPTO) || OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
const_bignum pubkey;
|
||||
#else
|
||||
bignum pubkey = NULL;
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
(void) type;
|
||||
(void) user;
|
||||
|
||||
@@ -212,6 +216,9 @@ SSH_PACKET_CALLBACK(ssh_packet_client_dhgex_group)
|
||||
if (rc != SSH_OK) {
|
||||
goto error;
|
||||
}
|
||||
#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
bignum_safe_free(pubkey);
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
|
||||
session->dh_handshake_state = DH_STATE_INIT_SENT;
|
||||
|
||||
@@ -229,6 +236,9 @@ error:
|
||||
bignum_safe_free(generator);
|
||||
bignum_safe_free(one);
|
||||
bignum_safe_free(pmin1);
|
||||
#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
bignum_safe_free(pubkey);
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
if(!bignum_ctx_invalid(ctx)) {
|
||||
bignum_ctx_free(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user