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

protobuf: add enum value validation #363

Merged
merged 2 commits into from
Aug 2, 2019
Merged

Conversation

matejcik
Copy link
Contributor

wip for now, i'll need to add tests

@matejcik matejcik requested a review from jpochyla July 26, 2019 16:02
@matejcik matejcik self-assigned this Jul 26, 2019
@matejcik matejcik added core Trezor Core firmware. Runs on Trezor Model T and T2B1. enhancement protobuf Structure of messages exchanged between Trezor and the host trezorlib Python library and the command line trezorctl tool. labels Jul 26, 2019
@matejcik matejcik added this to the backlog milestone Jul 26, 2019
@matejcik matejcik force-pushed the matejcik/protobuf-enum branch from bcb3ddb to 185e417 Compare August 2, 2019 10:25
@matejcik matejcik marked this pull request as ready for review August 2, 2019 10:26
@matejcik
Copy link
Contributor Author

matejcik commented Aug 2, 2019

tests are now done.

  • core will reject invalid enum values, but is allowed to emit them (static checking should help at some point)
  • trezorlib will both emit and accept invalid values, but will show warnings

@matejcik matejcik force-pushed the matejcik/protobuf-enum branch from 185e417 to 17597d2 Compare August 2, 2019 10:33
Copy link
Contributor

@jpochyla jpochyla left a comment

Choose a reason for hiding this comment

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

<3

@matejcik matejcik force-pushed the matejcik/protobuf-enum branch from 6b2953d to 22e19c0 Compare August 2, 2019 16:20
@matejcik matejcik merged commit aa9860f into master Aug 2, 2019
@matejcik matejcik deleted the matejcik/protobuf-enum branch August 2, 2019 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Trezor Core firmware. Runs on Trezor Model T and T2B1. protobuf Structure of messages exchanged between Trezor and the host trezorlib Python library and the command line trezorctl tool.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants