Skip to content

Commit

Permalink
Fix FIPS test in s2n_pq_kem_test.c
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Mar 9, 2023
1 parent 393ec89 commit adaa2f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/s2n_pq_kem_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

#include "pq-crypto/s2n_pq.h"
#include "crypto/s2n_fips.h"
#include "crypto/s2n_openssl.h"
#include "s2n_test.h"
#include "tests/testlib/s2n_testlib.h"
Expand Down Expand Up @@ -51,8 +52,8 @@ int main()
{
BEGIN_TEST();

/* Verify that Kyber512 is available from AWS-LC if AWS-LC is our current libcrypto. */
if (s2n_libcrypto_is_awslc() && s2n_pq_is_enabled()) {
/* Verify that Kyber512 is available from AWS-LC if non-FIPS AWS-LC is our current libcrypto. */
if (s2n_libcrypto_is_awslc() && !s2n_libcrypto_is_fips()) {
EXPECT_TRUE(s2n_libcrypto_supports_kyber_512());
} else {
EXPECT_FALSE(s2n_libcrypto_supports_kyber_512());
Expand Down

0 comments on commit adaa2f9

Please sign in to comment.