summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-04-15 11:00:27 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-04-16 09:20:54 +0900
commitcf9fd197a38f0faf3868750847181381d867c69c (patch)
tree6c11c45b3b03eb025e897a75e7cb247bf2309159
parentf5ef9f7cd405e4f8fb59f34f317d739f066d7185 (diff)
downloadkftpgrabber-cf9fd197a38f0faf3868750847181381d867c69c.tar.gz
kftpgrabber-cf9fd197a38f0faf3868750847181381d867c69c.zip
Fix FTBFS causes by invalid casts. This resolves issue #13
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kftpgrabber/src/misc/libs/ssh/dh.c6
-rw-r--r--kftpgrabber/src/misc/libs/ssh/keys.c4
-rw-r--r--kftpgrabber/src/misc/libs/ssh/priv.h2
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);