Skip to content

Commit bf53411

Browse files
committed
Update crates to cipher v0.4
1 parent 81e0de5 commit bf53411

File tree

198 files changed

+5332
-7303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+5332
-7303
lines changed

.github/workflows/aes.yml

Lines changed: 87 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
rust:
26-
- 1.49.0 # MSRV
26+
- 1.56.0 # MSRV
2727
- stable
2828
target:
2929
- thumbv7em-none-eabi
@@ -36,13 +36,25 @@ jobs:
3636
target: ${{ matrix.target }}
3737
profile: minimal
3838
override: true
39-
- run: cargo check --features compact,ctr,force-soft
40-
- run: cargo build --release --target ${{ matrix.target }}
41-
- run: cargo build --release --target ${{ matrix.target }} --features compact
42-
- run: cargo build --release --target ${{ matrix.target }} --features ctr
43-
- run: cargo build --release --target ${{ matrix.target }} --features force-soft
44-
- run: cargo build --release --target ${{ matrix.target }} --features hazmat
45-
- run: cargo build --release --target ${{ matrix.target }} --features compact,ctr,force-soft
39+
- run: cargo check
40+
- run: |
41+
cargo build --target ${{ matrix.target }}
42+
cargo build --target ${{ matrix.target }} --features hazmat
43+
- env:
44+
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft"
45+
run: |
46+
cargo build --target ${{ matrix.target }}
47+
cargo build --target ${{ matrix.target }} --features hazmat
48+
- env:
49+
RUSTFLAGS: "-Dwarnings --cfg aes_compact"
50+
run: |
51+
cargo build --target ${{ matrix.target }}
52+
cargo build --target ${{ matrix.target }} --features hazmat
53+
- env:
54+
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft --cfg aes_compact"
55+
run: |
56+
cargo build --target ${{ matrix.target }}
57+
cargo build --target ${{ matrix.target }} --features hazmat
4658
4759
# Tests for the AES-NI backend
4860
aesni:
@@ -56,15 +68,15 @@ jobs:
5668
include:
5769
# 32-bit Linux
5870
- target: i686-unknown-linux-gnu
59-
rust: 1.49.0 # MSRV
71+
rust: 1.56.0 # MSRV
6072
deps: sudo apt update && sudo apt install gcc-multilib
6173
- target: i686-unknown-linux-gnu
6274
rust: stable
6375
deps: sudo apt update && sudo apt install gcc-multilib
6476

6577
# 64-bit Linux
6678
- target: x86_64-unknown-linux-gnu
67-
rust: 1.49.0 # MSRV
79+
rust: 1.56.0 # MSRV
6880
- target: x86_64-unknown-linux-gnu
6981
rust: stable
7082
steps:
@@ -76,12 +88,9 @@ jobs:
7688
profile: minimal
7789
override: true
7890
- run: ${{ matrix.deps }}
79-
- run: cargo test --release --target ${{ matrix.target }}
80-
- run: cargo test --release --target ${{ matrix.target }} --features compact
81-
- run: cargo test --release --target ${{ matrix.target }} --features ctr
82-
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
83-
- run: cargo test --release --target ${{ matrix.target }} --features hazmat
84-
- run: cargo test --release --target ${{ matrix.target }} --all-features
91+
- run: cargo test --target ${{ matrix.target }}
92+
- run: cargo test --target ${{ matrix.target }} --features hazmat
93+
- run: cargo test --target ${{ matrix.target }} --all-features
8594

8695
# Tests for CPU feature autodetection with fallback to portable software implementation
8796
autodetect:
@@ -91,15 +100,15 @@ jobs:
91100
include:
92101
# 32-bit Linux
93102
- target: i686-unknown-linux-gnu
94-
rust: 1.49.0 # MSRV
103+
rust: 1.56.0 # MSRV
95104
deps: sudo apt update && sudo apt install gcc-multilib
96105
- target: i686-unknown-linux-gnu
97106
rust: stable
98107
deps: sudo apt update && sudo apt install gcc-multilib
99108

100109
# 64-bit Linux
101110
- target: x86_64-unknown-linux-gnu
102-
rust: 1.49.0 # MSRV
111+
rust: 1.56.0 # MSRV
103112
- target: x86_64-unknown-linux-gnu
104113
rust: stable
105114
steps:
@@ -111,29 +120,29 @@ jobs:
111120
profile: minimal
112121
override: true
113122
- run: ${{ matrix.deps }}
114-
- run: cargo test --release --target ${{ matrix.target }}
115-
- run: cargo test --release --target ${{ matrix.target }} --features compact
116-
- run: cargo test --release --target ${{ matrix.target }} --features ctr
117-
- run: cargo test --release --target ${{ matrix.target }} --features hazmat
118-
- run: cargo test --release --target ${{ matrix.target }} --all-features
123+
- run: cargo test --target ${{ matrix.target }}
124+
- run: cargo test --target ${{ matrix.target }} --features hazmat
125+
- run: cargo test --target ${{ matrix.target }} --all-features
119126

120-
# Tests for the portable software backend (i.e. `force-soft`-only)
127+
# Tests for the portable software backend (i.e. `aes_force_soft`-only)
121128
soft:
122129
runs-on: ubuntu-latest
130+
env:
131+
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft"
123132
strategy:
124133
matrix:
125134
include:
126135
# 32-bit Linux
127136
- target: i686-unknown-linux-gnu
128-
rust: 1.41.0 # MSRV (temporarily lower than with CPU feature auto-detection)
137+
rust: 1.56.0 # MSRV
129138
deps: sudo apt update && sudo apt install gcc-multilib
130139
- target: i686-unknown-linux-gnu
131140
rust: stable
132141
deps: sudo apt update && sudo apt install gcc-multilib
133142

134143
# 64-bit Linux
135144
- target: x86_64-unknown-linux-gnu
136-
rust: 1.41.0 # MSRV (temporarily lower than with CPU feature auto-detection)
145+
rust: 1.56.0 # MSRV
137146
- target: x86_64-unknown-linux-gnu
138147
rust: stable
139148
steps:
@@ -145,10 +154,9 @@ jobs:
145154
profile: minimal
146155
override: true
147156
- run: ${{ matrix.deps }}
148-
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
149-
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,compact
150-
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,ctr
151-
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,compact,ctr
157+
- run: cargo test --target ${{ matrix.target }}
158+
- run: cargo test --target ${{ matrix.target }} --all-features
159+
152160

153161
# Cross-compiled tests
154162
cross:
@@ -157,16 +165,20 @@ jobs:
157165
include:
158166
# ARM64
159167
- target: aarch64-unknown-linux-gnu
160-
rust: 1.49.0 # MSRV
168+
rust: 1.56.0 # MSRV
161169
- target: aarch64-unknown-linux-gnu
162170
rust: stable
163171

164172
# PPC32
165173
- target: powerpc-unknown-linux-gnu
166-
rust: 1.49.0 # MSRV
174+
rust: 1.56.0 # MSRV
167175
- target: powerpc-unknown-linux-gnu
168176
rust: stable
169177
runs-on: ubuntu-latest
178+
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
179+
defaults:
180+
run:
181+
working-directory: .
170182
steps:
171183
- uses: actions/checkout@v1
172184
- run: ${{ matrix.deps }}
@@ -176,22 +188,45 @@ jobs:
176188
target: ${{ matrix.target }}
177189
profile: minimal
178190
override: true
179-
- run: cargo install cross
180-
- run: cross test --release --target ${{ matrix.target }}
181-
- run: cross test --release --target ${{ matrix.target }} --features compact
182-
- run: cross test --release --target ${{ matrix.target }} --features ctr
183-
- run: cross test --release --target ${{ matrix.target }} --features force-soft
184-
- run: cross test --release --target ${{ matrix.target }} --features hazmat
185-
- run: cross test --release --target ${{ matrix.target }} --features compact,ctr,force-soft,hazmat
191+
- name: Install pre-compiled cross
192+
run: |
193+
export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
194+
wget -O /tmp/binaries.tar.gz $URL
195+
tar -C /tmp -xzf /tmp/binaries.tar.gz
196+
mv /tmp/cross ~/.cargo/bin
197+
- run: |
198+
cross test --package aes --target ${{ matrix.target }}
199+
cross test --package aes --target ${{ matrix.target }} --features hazmat
200+
- env:
201+
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft"
202+
run: |
203+
cross test --package aes --target ${{ matrix.target }}
204+
cross test --package aes --target ${{ matrix.target }} --features hazmat
205+
- env:
206+
RUSTFLAGS: "-Dwarnings --cfg aes_compact"
207+
run: |
208+
cross test --package aes --target ${{ matrix.target }}
209+
cross test --package aes --target ${{ matrix.target }} --features hazmat
210+
- env:
211+
RUSTFLAGS: "-Dwarnings --cfg aes_force_soft --cfg aes_compact"
212+
run: |
213+
cross test --package aes --target ${{ matrix.target }}
214+
cross test --package aes --target ${{ matrix.target }} --features hazmat
186215
187216
# ARMv8 cross-compiled tests for AES intrinsics (nightly-only)
188217
armv8:
218+
env:
219+
RUSTFLAGS: "-Dwarnings --cfg aes_armv8"
189220
strategy:
190221
matrix:
191222
include:
192223
- target: aarch64-unknown-linux-gnu
193224
rust: nightly
194225
runs-on: ubuntu-latest
226+
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
227+
defaults:
228+
run:
229+
working-directory: .
195230
steps:
196231
- uses: actions/checkout@v1
197232
- run: ${{ matrix.deps }}
@@ -201,22 +236,26 @@ jobs:
201236
target: ${{ matrix.target }}
202237
profile: minimal
203238
override: true
204-
- run: cargo install cross
205-
- run: cross test --release --target ${{ matrix.target }} --features armv8
206-
- run: cross test --release --target ${{ matrix.target }} --features armv8,compact
207-
- run: cross test --release --target ${{ matrix.target }} --features armv8,ctr
208-
- run: cross test --release --target ${{ matrix.target }} --features armv8,force-soft
209-
- run: cross test --release --target ${{ matrix.target }} --features armv8,hazmat
210-
- run: cross test --release --target ${{ matrix.target }} --all-features
239+
- name: Install pre-compiled cross
240+
run: |
241+
export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
242+
wget -O /tmp/binaries.tar.gz $URL
243+
tar -C /tmp -xzf /tmp/binaries.tar.gz
244+
mv /tmp/cross ~/.cargo/bin
245+
- run: cross test --package aes --target ${{ matrix.target }}
246+
- run: cross test --package aes --target ${{ matrix.target }} --features hazmat
247+
- run: cross test --package aes --target ${{ matrix.target }} --all-features
211248

212249
clippy:
250+
env:
251+
RUSTFLAGS: "-Dwarnings --cfg aes_compact"
213252
runs-on: ubuntu-latest
214253
steps:
215254
- uses: actions/checkout@v1
216255
- uses: actions-rs/toolchain@v1
217256
with:
218-
toolchain: 1.49.0 # MSRV
257+
toolchain: 1.56.0 # MSRV
219258
components: clippy
220259
override: true
221260
profile: minimal
222-
- run: cargo clippy --features compact,ctr,hazmat -- -D warnings
261+
- run: cargo clippy --features hazmat -- -D warnings

.github/workflows/block-modes.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/blowfish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.56.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
rust:
45-
- 1.41.0 # MSRV
45+
- 1.56.0 # MSRV
4646
- stable
4747
steps:
4848
- uses: actions/checkout@v1

.github/workflows/cast5.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.56.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
rust:
45-
- 1.41.0 # MSRV
45+
- 1.56.0 # MSRV
4646
- stable
4747
steps:
4848
- uses: actions/checkout@v1

.github/workflows/des.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.56.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
rust:
45-
- 1.41.0 # MSRV
45+
- 1.56.0 # MSRV
4646
- stable
4747
steps:
4848
- uses: actions/checkout@v1

0 commit comments

Comments
 (0)