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 add subcommand #151

Closed
wants to merge 3 commits into from
Closed

Conversation

robinkrahl
Copy link
Collaborator

This patch adds the pws add subcommand that locates the first
unprogrammed PWS slot and writes to it.


This patch is part of an effort to improve the PWS user interface, see #139.

This PR is based on #150. (I thought it would be independent of it, but it made more sense to reuse the slot assertion helper method.)

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 patch adds the pws add subcommand that locates the first
unprogrammed PWS slot and writes to it.
@d-e-s-o
Copy link
Owner

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

This PR is based on #150. (I thought it would be independent of it, but it made more sense to reuse the slot assertion helper method.)

Beats me how a service/UI used by tens of thousand of people and being worked on full time doesn't have some kind of pull request stacking feature, to tell the truth ;-)

@d-e-s-o
Copy link
Owner

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

Thanks for the change! I merged it into devel.

@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-add 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