Skip to content

Fix KeyConfig default capabilities - #168

Open
pollychen-lab wants to merge 1 commit into
nubster-opensources:mainfrom
pollychen-lab:agent/fix-keyconfig-default
Open

Fix KeyConfig default capabilities#168
pollychen-lab wants to merge 1 commit into
nubster-opensources:mainfrom
pollychen-lab:agent/fix-keyconfig-default

Conversation

@pollychen-lab

Copy link
Copy Markdown

Summary

Fixes #147.

KeyConfig documented encryption and decryption as enabled by default, and KeyConfig::new() already set both flags to true, but the derived Default implementation left all booleans as false. This made KeyConfig::default() create a key configuration that could neither encrypt nor decrypt.

This PR replaces the derived default with an explicit Default implementation that delegates to KeyConfig::new(), keeping the idiomatic constructor aligned with the documented contract. It also adds a regression test for the expected default capabilities.

Validation

  • cargo fmt --check
  • cargo test -p egide-transit test_key_config_default_matches_new
  • cargo test -p egide-transit
  • cargo clippy -p egide-transit --all-targets -- -D warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyConfig::default() produces a key that supports neither encryption nor decryption

1 participant