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

trust anchor --remove doesn't print any output or change exit code on failure #300

Closed
nmav opened this issue Jun 11, 2020 · 2 comments · Fixed by #301
Closed

trust anchor --remove doesn't print any output or change exit code on failure #300

nmav opened this issue Jun 11, 2020 · 2 comments · Fixed by #301

Comments

@nmav
Copy link
Contributor

nmav commented Jun 11, 2020

p11-kit-0.23.20:

# trust anchor --remove 'pkcs11:id=%AD%6C%AA%94%60%9C%ED%E4%FF%FA%3E%0A%74%2B%63%03%F7%B6%59%BF;type=cert'

Exit code is zero and no error is printed. When run with verbose it prints that the certificate was not removed.

p11-kit-0.23.2:

# trust anchor --remove 'pkcs11:id=%AD%6C%AA%94%60%9C%ED%E4%FF%FA%3E%0A%74%2B%63%03%F7%B6%59%BF;type=cert'
p11-kit: couldn't remove read-only certificate

Exit code is again zero but an error message is printed.

I think the expected behavior on failure would be to print a message and set an error code.

@ueno
Copy link
Member

ueno commented Jun 11, 2020

As for the message, this is a regression after #84 (yours :-). Maybe, all the tools provided by the p11-kit package should call p11_message_loud at startup. As a workaround, you could use -v.

@nmav
Copy link
Contributor Author

nmav commented Jun 11, 2020

I certainly do many mistakes :) Makes sense to me. Returning an error would also be useful for scripting these tools.

ueno added a commit to ueno/p11-kit that referenced this issue Jun 12, 2020
ueno added a commit to ueno/p11-kit that referenced this issue Jun 12, 2020
Suggested by Nikos Mavrogiannopoulos in:
p11-glue#300
ueno added a commit to ueno/p11-kit that referenced this issue Jun 12, 2020
Suggested by Nikos Mavrogiannopoulos in:
p11-glue#300
@ueno ueno closed this as completed in #301 Jun 16, 2020
ueno added a commit that referenced this issue Jun 16, 2020
Suggested by Nikos Mavrogiannopoulos in:
#300
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