From b766778c220229e57f503dc0ffb9d77d3ffd091a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 7 Sep 2026 10:10:33 +0200 Subject: [PATCH] openssl: make `ssh2_bn_bytes()`/`ssh2_bn_bits()` return `size_t` To match other crypto backends. Closes #2592 --- src/openssl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openssl.h b/src/openssl.h index bd72dec2..4b6009c0 100644 --- a/src/openssl.h +++ b/src/openssl.h @@ -346,8 +346,8 @@ typedef enum { #define ssh2_bn_set_word(bn, word) !BN_set_word(bn, word) #define ssh2_bn_from_bin(bn, bin, l) (BN_bin2bn(bin, (int)(l), bn) ? 0 : -1) #define ssh2_bn_to_bin(bn, bin) (BN_bn2bin(bn, bin) <= 0) -#define ssh2_bn_bytes(bn) BN_num_bytes(bn) -#define ssh2_bn_bits(bn) BN_num_bits(bn) +#define ssh2_bn_bytes(bn) ((size_t)BN_num_bytes(bn)) +#define ssh2_bn_bits(bn) ((size_t)BN_num_bits(bn)) #define ssh2_bn_free(bn) BN_clear_free(bn) #define ssh2_dh_ctx BIGNUM *