Change dhm_calc_secret() prototype

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-04 14:22:07 +02:00
parent 07de4b1d08
commit 2d627649bf
7 changed files with 21 additions and 10 deletions

View file

@ -249,10 +249,15 @@ cleanup:
* Derive and export the shared secret (G^Y)^X mod P
*/
int dhm_calc_secret( dhm_context *ctx,
unsigned char *output, size_t *olen )
unsigned char *output, size_t *olen,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
int ret;
(void) f_rng;
(void) p_rng;
if( ctx == NULL || *olen < ctx->len )
return( POLARSSL_ERR_DHM_BAD_INPUT_DATA );