Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
goatgoose committed Mar 13, 2024
1 parent ed06432 commit 5178581
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions crypto/s2n_fips.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ int s2n_is_in_fips_mode(void)
int s2n_is_fips(bool *fips)
{
POSIX_ENSURE_REF(fips);
*fips = false;
POSIX_ENSURE(s2n_is_initialized(), S2N_ERR_NOT_INITIALIZED);

if (s2n_is_in_fips_mode()) {
*fips = true;
}

*fips = s2n_is_in_fips_mode();
return S2N_SUCCESS;
}
3 changes: 1 addition & 2 deletions tests/unit/s2n_fips_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ int main()

/* s2n_is_fips() fails before init */
{
bool fips = true;
bool fips = false;
EXPECT_FAILURE_WITH_ERRNO(s2n_is_fips(&fips), S2N_ERR_NOT_INITIALIZED);
EXPECT_FALSE(fips);
}

EXPECT_SUCCESS(s2n_init());
Expand Down

0 comments on commit 5178581

Please sign in to comment.