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

Add pws update subcommand #150

Closed
wants to merge 2 commits into from
Closed

Conversation

robinkrahl
Copy link
Collaborator

This patch adds the pws update subcommand that overwrites some fields of
a programmed PWS slot. We always have to specify the values for all
fields when calling writing to a slot, so we first query the current
values of the fields that remain unchanged and then execute the write
command. This is a potential race condition, but concurrent access to a
Nitrokey device is unsupported and highly likely to mess up the
communication anyway.


This is a first step towards implementing a better PWS interface as discussed in #139.

This patch adds the pws update subcommand that overwrites some fields of
a programmed PWS slot.  We always have to specify the values for all
fields when calling writing to a slot, so we first query the current
values of the fields that remain unchanged and then execute the write
command.  This is a potential race condition, but concurrent access to a
Nitrokey device is unsupported and highly likely to mess up the
communication anyway.
@d-e-s-o
Copy link
Owner

d-e-s-o commented Apr 17, 2021

Merged. Thanks for the pull request!

@d-e-s-o d-e-s-o closed this Apr 17, 2021
@robinkrahl robinkrahl mentioned this pull request Apr 18, 2021
5 tasks
@robinkrahl robinkrahl deleted the pws-update branch April 21, 2021 07:52
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.

2 participants