|
|
@ -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;
|
|
|
|
STRING *ptr;
|
|
|
|
int pad=0;
|
|
|
|
int pad=0;
|
|
|
|
int len=bignum_num_bytes(num);
|
|
|
|
int len=bignum_num_bytes(num);
|
|
|
@ -142,14 +142,14 @@ STRING *make_bignum_string(bignum num){
|
|
|
|
ptr->size=htonl(len+pad);
|
|
|
|
ptr->size=htonl(len+pad);
|
|
|
|
if(pad)
|
|
|
|
if(pad)
|
|
|
|
ptr->string[0]=0;
|
|
|
|
ptr->string[0]=0;
|
|
|
|
finallen=bignum_bn2bin(num,ptr->string+pad);
|
|
|
|
finallen=bignum_bn2bin(num,(unsigned char*)(ptr->string+pad));
|
|
|
|
return ptr;
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bignum make_string_bn(STRING *string){
|
|
|
|
bignum make_string_bn(STRING *string){
|
|
|
|
int len=ntohl(string->size);
|
|
|
|
int len=ntohl(string->size);
|
|
|
|
ssh_say(3,"Importing a %d bits,%d bytes object ...\n",len*8,len);
|
|
|
|
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){
|
|
|
|
STRING *dh_get_e(SSH_SESSION *session){
|
|
|
|