Commit 956234c
authored
fix: resolve clippy lints and update dependencies (#65)
* fix(deps): update aes dependency from 0.7 to 0.8
Migrate to use separate ctr crate following RustCrypto best practices.
The aes 0.8 release removed the ctr feature, requiring use of the
standalone ctr crate for AES-CTR mode operations.
Changes:
- Update aes dependency to 0.8 (remove ctr feature)
- Add ctr 0.9 dependency
- Update v1_local and v3_local cipher implementations to use new API
- Add ctr feature to v1_local and v3_local feature flags
All feature combinations tested and passing.
Closes #54
* feat: add compile-time checks for incompatible feature combinations
Prevents cryptic trait conflict errors by detecting incompatible feature
combinations at compile time with clear error messages.
Changes:
- Add compile_error! macros for conflicting public features
- Configure docs.rs to avoid --all-features (use default features)
- Document architectural design decisions in Cargo.toml
The PASETO specification recommends using a single version per application.
Multiple public features cause conflicting From<ed25519_dalek::ed25519::Error>
implementations. These checks enforce this design at compile time.
Error messages guide users to:
- Choose only one public feature
- Reference issue #48 for context
- Understand this is intentional design
Docs.rs configuration prevents build failures by using default features
(batteries_included + v4_local + v4_public) instead of --all-features.
Addresses #48
* chore(deps): update rand_core from 0.6 to 0.9
Update rand_core dependency to latest compatible version.
All 8 feature combinations tested and passing:
- v1_local: 12 tests passed
- v2_local: 14 tests passed
- v3_local: 16 tests passed
- v4_local: 13 tests passed
- v1_public: 8 tests passed
- v2_public: 10 tests passed
- v3_public: 7 tests passed
- v4_public: 10 tests passed
* chore(deps): update thiserror to 2.0
Update thiserror dependency from 1.0.69 to 2.0.17. All tests pass
across the entire feature matrix (v1-v4, local and public).
Changes include automatic clippy fixes for code style issues.
* chore(deps): update primes dev dependency to 0.4
Update primes from 0.3 to 0.4 in dev dependencies.
* docs: fix doc comment indentation for list items
Resolve clippy::doc-lazy-continuation warnings by properly indenting
continuation lines in documentation comments.
* refactor: remove unnecessary parentheses around impl types
Remove redundant parentheses from impl trait parameter types in
function signatures for all PASETO version implementations.
* refactor: replace deprecated ring constant-time comparison with subtle
Replace ring::constant_time::verify_slices_are_equal with subtle crate's
ConstantTimeEq trait for constant-time byte comparison. The subtle crate
is already present as a transitive dependency and provides the same
security guarantees.
* build: add subtle crate as direct dependency
Add subtle 2.6 as a direct dependency for constant-time operations.
While already present as a transitive dependency, explicit declaration
is required to import and use its ConstantTimeEq trait.
* fix: use correct PasetoError variant for MAC verification failures
Use PasetoError::Cryption for MAC tag comparison failures instead of
non-existent InvalidToken variant. This maintains security by providing
a general unspecified cryptographic error.
* fix: add explicit type annotation for subtle::Choice conversion
Use bool::from() for explicit type conversion of subtle::Choice to bool
to satisfy type inference requirements.1 parent faa8f36 commit 956234c
11 files changed
Lines changed: 28 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
0 commit comments