Skip to content

Commit

Permalink
fixup! Refactor the DRBG implementations to manage locking themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcaswell committed May 31, 2023
1 parent e7c716e commit cf1211d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions providers/implementations/rands/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,6 @@ int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg)
return 1;
}

/*
* Reseed |drbg|, mixing in the specified data
*
* Acquires the drbg->lock for writing, if non-null.
*
* Returns 1 on success, 0 on failure.
*/
static int ossl_prov_drbg_reseed_unlocked(PROV_DRBG *drbg,
int prediction_resistance,
const unsigned char *ent,
Expand Down Expand Up @@ -597,6 +590,13 @@ static int ossl_prov_drbg_reseed_unlocked(PROV_DRBG *drbg,
return 0;
}

/*
* Reseed |drbg|, mixing in the specified data
*
* Acquires the drbg->lock for writing, if non-null.
*
* Returns 1 on success, 0 on failure.
*/
int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
const unsigned char *ent, size_t ent_len,
const unsigned char *adin, size_t adinlen)
Expand Down

0 comments on commit cf1211d

Please sign in to comment.