From cbf1f6aae553420da756e9f3355709320fab44ee Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 7 Aug 2024 16:03:58 +0100 Subject: [PATCH] [Minor] Some more fixes for old OSSL --- src/libcryptobox/cryptobox.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c index f55b9fead..3ea23030d 100644 --- a/src/libcryptobox/cryptobox.c +++ b/src/libcryptobox/cryptobox.c @@ -384,7 +384,7 @@ void rspamd_cryptobox_keypair(rspamd_pk_t pk, rspamd_sk_t sk, group = EC_KEY_get0_group(ec_sec); BIGNUM *bn_pub; - bn_pub = EC_POINT_point2bn(EC_KEY_get0_group(ec_sec), + bn_pub = EC_POINT_point2bn(group, ec_pub, POINT_CONVERSION_UNCOMPRESSED, NULL, NULL); len = BN_num_bytes(bn_pub); g_assert(len <= (int) rspamd_cryptobox_pk_bytes(mode)); @@ -459,7 +459,6 @@ void rspamd_cryptobox_keypair_sig(rspamd_sig_pk_t pk, rspamd_sig_sk_t sk, len = BN_num_bytes(bn_sec); g_assert(len <= (int) sizeof(rspamd_sig_sk_t)); BN_bn2bin(bn_sec, sk); - BN_free(bn_sec); EC_KEY_free(ec_sec); #endif -- 2.39.5