Skip to content

Commit

Permalink
Script verifying CPU Jitter Entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 13, 2025
1 parent 2884287 commit 6670d34
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/fips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,22 @@ jobs:
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
cpu-jitter-entropy-test:
if: github.repository_owner == 'aws'
name: CPU Jitter Entropy Tests
runs-on: ubuntu-latest
env:
AWS_LC_FIPS_SYS_CPU_JITTER_ENTROPY: 1
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: nightly
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Run assert script
run: ./scripts/tests/assert_cpu_jitter_entropy.rs
13 changes: 13 additions & 0 deletions scripts/tests/assert_cpu_jitter_entropy.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env -S cargo +nightly -Zscript
---cargo
[dependencies]
aws-lc-rs = { version = "1", path = "../../aws-lc-rs", default-features = false, features = ["fips"] }
---
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC

fn main() {
println!("Checking for CPU Jitter Entropy");
aws_lc_rs::fips_cpu_jitter_entropy();
println!("CPU Jitter Entropy Success");
}

0 comments on commit 6670d34

Please sign in to comment.