diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-04-15 11:00:27 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-04-16 09:22:00 +0900 |
commit | b97aa92b8077c33e11e150b496c0038a5b57d5c9 (patch) | |
tree | 93fc127bd05d7f633a58c639f5c6c12ac24c5120 | |
parent | 9e15b50b272c38fb1d905f8e78c95e3ca4aca9b6 (diff) | |
download | kftpgrabber-b97aa92b8077c33e11e150b496c0038a5b57d5c9.tar.gz kftpgrabber-b97aa92b8077c33e11e150b496c0038a5b57d5c9.zip |
Fix FTBFS causes by invalid casts. This resolves issue #13r14.1.2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit cf9fd197a38f0faf3868750847181381d867c69c)
-rw-r--r-- | kftpgrabber/src/misc/libs/ssh/dh.c | 6 | ||||
-rw-r--r-- | kftpgrabber/src/misc/libs/ssh/keys.c | 4 | ||||
-rw-r--r-- | kftpgrabber/src/misc/libs/ssh/priv.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/kftpgrabber/src/misc/libs/ssh/dh.c b/kftpgrabber/src/misc/libs/ssh/dh.c index 0a1b557..f186cdf 100644 --- a/kftpgrabber/src/misc/libs/ssh/dh.c +++ b/kftpgrabber/src/misc/libs/ssh/dh.c @@ -128,7 +128,7 @@ void dh_generate_e(SSH_SESSION *session){ } -STRING *make_bignum_string(bignum num){ +STRING *make_bignum_string(const bignum num){ STRING *ptr; int pad=0; int len=bignum_num_bytes(num); @@ -142,14 +142,14 @@ STRING *make_bignum_string(bignum num){ ptr->size=htonl(len+pad); if(pad) ptr->string[0]=0; - finallen=bignum_bn2bin(num,ptr->string+pad); + finallen=bignum_bn2bin(num,(unsigned char*)(ptr->string+pad)); return ptr; } bignum make_string_bn(STRING *string){ int len=ntohl(string->size); ssh_say(3,"Importing a %d bits,%d bytes object ...\n",len*8,len); - return bignum_bin2bn(string->string,len,NULL); + return bignum_bin2bn((unsigned char*)(string->string),len,NULL); } STRING *dh_get_e(SSH_SESSION *session){ diff --git a/kftpgrabber/src/misc/libs/ssh/keys.c b/kftpgrabber/src/misc/libs/ssh/keys.c index 2d7541b..b950651 100644 --- a/kftpgrabber/src/misc/libs/ssh/keys.c +++ b/kftpgrabber/src/misc/libs/ssh/keys.c @@ -173,8 +173,8 @@ STRING *signature_to_string(SIGNATURE *sign){ free(tmp); switch(sign->type){ case TYPE_DSS: { - BIGNUM *bn_r = 0L; - BIGNUM *bn_s = 0L; + const BIGNUM *bn_r = 0L; + const BIGNUM *bn_s = 0L; #if OPENSSL_VERSION_NUMBER < 0x10100000L bn_r = sign->dsa_sign->r; bn_s = sign->dsa_sign->s; diff --git a/kftpgrabber/src/misc/libs/ssh/priv.h b/kftpgrabber/src/misc/libs/ssh/priv.h index 95e43bc..9749629 100644 --- a/kftpgrabber/src/misc/libs/ssh/priv.h +++ b/kftpgrabber/src/misc/libs/ssh/priv.h @@ -288,7 +288,7 @@ void generate_session_keys(SSH_SESSION *session); /* returns 1 if server signature ok, 0 otherwise. The NEXT crypto is checked, not the current one */ int signature_verify(SSH_SESSION *session,STRING *signature); bignum make_string_bn(STRING *string); -STRING *make_bignum_string(bignum num); +STRING *make_bignum_string(const bignum num); /* in crypt.c */ u32 packet_decrypt_len(SSH_SESSION *session,char *crypted); |