Fix FTBFS causes by invalid casts. This resolves issue #13

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit cf9fd197a3)
r14.1.x r14.1.2
Michele Calgaro 7 months ago
parent 9e15b50b27
commit b97aa92b80
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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){

@ -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;

@ -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);

Loading…
Cancel
Save