Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aes and kuznyechik CI workflows #311

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions .github/workflows/aes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: aes
on:
pull_request:
paths:
- ".github/workflows/aes.yml"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably do this everywhere in order to ensure changes to a workflow trigger the workflow

- "aes/**"
- "Cargo.*"
push:
Expand Down Expand Up @@ -39,8 +40,8 @@ jobs:
override: true
- run: cargo check
- run: |
cargo build --target ${{ matrix.target }}
cargo build --target ${{ matrix.target }} --features hazmat
cargo build --target ${{ matrix.target }}
cargo build --target ${{ matrix.target }} --features hazmat
- env:
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft"
run: |
Expand Down Expand Up @@ -205,8 +206,8 @@ jobs:
tar -C /tmp -xzf /tmp/binaries.tar.gz
mv /tmp/cross ~/.cargo/bin
- run: |
cross test --package aes --target ${{ matrix.target }}
cross test --package aes --target ${{ matrix.target }} --features hazmat
cross test --package aes --target ${{ matrix.target }}
cross test --package aes --target ${{ matrix.target }} --features hazmat
- env:
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft"
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/kuznyechik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: kuznyechik
on:
pull_request:
paths:
- ".github/workflows/kuznyechik.yml"
- "kuznyechik/**"
- "Cargo.*"
push:
Expand Down Expand Up @@ -62,8 +63,8 @@ jobs:
override: true
profile: minimal
- run: |
cargo test
cargo test --all-features
cargo test
cargo test --all-features
- env:
RUSTFLAGS: "-Dwarnings --cfg kuznyechik_force_soft"
run: |
Expand Down
6 changes: 3 additions & 3 deletions kuznyechik/src/soft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl AlgorithmName for Kuznyechik {
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
impl Drop for Kuznyechik {
fn drop(&mut self) {
self.keys.zeroize();
self.keys.iter_mut().for_each(|key| key.zeroize());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the Zeroize impl on core::slice::IterMut couldn't handle this case, I believe because this explicit version works due to implicit deref coercion.

}
}

Expand Down Expand Up @@ -135,7 +135,7 @@ impl AlgorithmName for KuznyechikEnc {
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
impl Drop for KuznyechikEnc {
fn drop(&mut self) {
self.keys.zeroize();
self.keys.iter_mut().for_each(|key| key.zeroize());
}
}

Expand Down Expand Up @@ -205,7 +205,7 @@ impl AlgorithmName for KuznyechikDec {
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
impl Drop for KuznyechikDec {
fn drop(&mut self) {
self.keys.zeroize();
self.keys.iter_mut().for_each(|key| key.zeroize());
}
}

Expand Down