Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crypto/fipsmodule/rand/cpu_jitter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ TEST(CPUJitterEntropyTest, Basic) {
// Draw some entropy to check if it works.
EXPECT_EQ(jent_read_entropy(jitter_ec.instance,
(char*) data0, data_len), data_len);

// Draw some entropy with the "safe" API to check if it works.
EXPECT_EQ(jent_read_entropy_safe(&jitter_ec.instance,
(char*) data1, data_len), data_len);
EXPECT_EQ(jent_read_entropy(jitter_ec.instance,
(char*) data1, data_len), data_len);

// Basic check that the random data is not equal.
EXPECT_NE(Bytes(data0), Bytes(data1));
Expand All @@ -60,8 +58,8 @@ TEST(CPUJitterEntropyTest, Basic) {
// Test drawing entropy from the Jitter object that was reset.
EXPECT_EQ(jent_read_entropy(jitter_ec.instance,
(char*) data0, data_len), data_len);
EXPECT_EQ(jent_read_entropy_safe(&jitter_ec.instance,
(char*) data1, data_len), data_len);
EXPECT_EQ(jent_read_entropy(jitter_ec.instance,
(char*) data1, data_len), data_len);

// Verify that the Jitter library version is v3.4.0.
unsigned int jitter_version = 3040000;
Expand Down
Loading