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

Expose OTP and PWS properties (slot counts, limits) #197

Open
robinkrahl opened this issue Apr 22, 2021 · 1 comment · May be fixed by #198
Open

Expose OTP and PWS properties (slot counts, limits) #197

robinkrahl opened this issue Apr 22, 2021 · 1 comment · May be fixed by #198
Milestone

Comments

@robinkrahl
Copy link
Contributor

To allow applications to validate user input before sending it to the device (see d-e-s-o/nitrocli#161), it would be nice to be able to access some OTP- and PWS-related properties using libnitrokey:

  • TOTP and HOTP slot counts
  • PWS slot count
  • maximum OTP name and secret length
  • maximum PWS name, login and password length

As far as I know, these values are the same for all supported devices, but are likely to change in the future. Therefore I suggest to not have them as constants but to add functions that return the value for the currently connected device instead.

If you don’t object, I’ll prepare a PR soon.

@szszszsz
Copy link
Member

Good idea! Please proceed.

@szszszsz szszszsz added this to the v3.7 milestone Apr 22, 2021
robinkrahl added a commit to robinkrahl/libnitrokey that referenced this issue Apr 22, 2021
This patch adds getters for the number of PWS, TOTP and HOTP slots on
the current device and the maximum length of a PWS slot name, login and
password as well as a OTP slot name and secret.

Fixes Nitrokey#197.
@robinkrahl robinkrahl linked a pull request Apr 22, 2021 that will close this issue
robinkrahl added a commit to robinkrahl/libnitrokey that referenced this issue Apr 23, 2021
This patch adds getters for the number of PWS, TOTP and HOTP slots on
the current device and the maximum length of a PWS slot name, login and
password as well as a OTP slot name and secret.

Fixes Nitrokey#197.
@szszszsz szszszsz modified the milestones: v3.7, v3.8 Apr 27, 2022
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 a pull request may close this issue.

2 participants