1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

bignum: Harmonize ssh_get_random()

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Aris Adamantiadis
2015-12-31 10:56:24 +01:00
committed by Andreas Schneider
parent 7b9a07c363
commit 36a727e656
6 changed files with 27 additions and 47 deletions

View File

@@ -50,7 +50,18 @@ static int alloc_key(struct ssh_cipher_struct *cipher) {
}
void ssh_reseed(void){
}
}
int ssh_get_random(void *where, int len, int strong)
{
/* variable not used in gcrypt */
(void) strong;
/* not using GCRY_VERY_STRONG_RANDOM which is a bit overkill */
gcry_randomize(where,len,GCRY_STRONG_RANDOM);
return 1;
}
SHACTX sha1_init(void) {
SHACTX ctx = NULL;