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 neutral variant #11

Merged
merged 9 commits into from
Jul 30, 2020
Merged

Conversation

alex-nitrokey
Copy link
Contributor

Attempt to add a vendor neutral variant for heads.
It feels like this is not a nice solution. We may should merge the single files all together.

hotp_initialize Outdated
Comment on lines 26 to 35
while [ "$i" -lt "$COUNTER" ]; do
echo "Updating counter to $i"
HOTP_CODE=$(echo $SECRET | hotp $i)
hotp_verification check $HOTP_CODE > /dev/null
if [ $? -ne 0 ]; then
echo "HOTP check failed for counter=$i, code=$HOTP_CODE"
exit 1
fi
let "i += 10"
done
Copy link
Member

Choose a reason for hiding this comment

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

In the current revision manual counter rewinding is obsolete, since the value could be provided directly.

main.c Outdated
Comment on lines 54 to 58
} else {
} else if(strstr(argv[0], nitrokey_exec) != NULL) {
key_brand = "Nitrokey";
} else {
key_brand = "USB security dongle";
Copy link
Member

Choose a reason for hiding this comment

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

Just an idea by the way: brand can be taken from the used device, and stored for the later use for UI needs. No need to have it hard-coded in multiple binaries, unless there is a need to accept only one particular device model.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the idea of detecting (when possible) the actual device in use and branding it in the interface accordingly. My main worry with generic branding is the risk of confusing a user who is new to these technologies and doesn't see "USB security dongle" printed on their Nitrokey or Librem Key, but does see "Nitrokey" or "Librem Key" on there. Since the USA Librem Keys and Nitrokeys now have different USB IDs we should be able to tell them apart relatively easily.

@szszszsz
Copy link
Member

szszszsz commented Jan 3, 2020

cc @kylerankin

@alex-nitrokey
Copy link
Contributor Author

I'll try to close this these days, I am sorry for the delay

@szszszsz
Copy link
Member

szszszsz commented Jun 9, 2020

Related: #12 (comment)

@alex-nitrokey alex-nitrokey changed the title WIP: Add neutral variant Add neutral variant Jun 25, 2020
@alex-nitrokey
Copy link
Contributor Author

This PR removes the term which decides which devices is requested completely. I found it suitable as the corresponding it asked to be inserted in Heads already. Please have a look at these changes and how I solved the issue in heads itself.

I hope you like this solution as a way to have a neutral version on the one hand, but an easy understanding terminology for users on the other hand.

@alex-nitrokey
Copy link
Contributor Author

alex-nitrokey commented Jun 25, 2020

This was tested in heads, see heads/#761

Copy link
Member

@szszszsz szszszsz left a comment

Choose a reason for hiding this comment

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

LGTM!

@szszszsz
Copy link
Member

@kylerankin Hi! I plan to merge this one today. Any objections?

@kylerankin
Copy link
Collaborator

kylerankin commented Jul 28, 2020 via email

@szszszsz szszszsz merged commit c0956cf into Nitrokey:master Jul 30, 2020
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.

4 participants