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

p11-kit tool: make "no matching object/token" error user friendly #575

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

ZoltanFridrich
Copy link
Contributor

@ZoltanFridrich ZoltanFridrich commented Sep 22, 2023

  • don't check slot == 0 as 0 is a valid slot ID
  • make the error message human friendly when no token/object is matched

Closes #574

@ZoltanFridrich ZoltanFridrich requested a review from ueno September 22, 2023 09:15
@ZoltanFridrich ZoltanFridrich self-assigned this Sep 22, 2023
@coveralls
Copy link

Coverage Status

coverage: 68.864% (-0.02%) from 68.882% when pulling 72c821b on ZoltanFridrich:zfridric_devel2 into e8872bf on p11-glue:master.

p11-kit/add-profile.c Outdated Show resolved Hide resolved
Copy link
Member

@ueno ueno left a comment

Choose a reason for hiding this comment

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

And of course, please add a test for the issues this PR is fixing.

p11-kit/test-objects.sh Outdated Show resolved Hide resolved
p11-kit/test-objects.sh Outdated Show resolved Hide resolved
p11-kit/test-profiles.sh Outdated Show resolved Hide resolved
Copy link
Member

@ueno ueno left a comment

Choose a reason for hiding this comment

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

LGTM!

@ZoltanFridrich ZoltanFridrich merged commit 5b13c85 into p11-glue:master Sep 26, 2023
12 checks passed
@ZoltanFridrich ZoltanFridrich deleted the zfridric_devel2 branch October 4, 2023 07:17
@ZoltanFridrich ZoltanFridrich added this to the 0.25.1 milestone Oct 25, 2023
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.

p11-kit commands expecting a single token/object prints confusing error upon no match
3 participants