Hide Forgot
Description of problem: It only works without login. Version-Release number of selected component (if applicable): gnutls-3.3.24-1.el7 How reproducible: always Steps to Reproduce: 0. export GNUTLS_PIN=1234; export GNUTLS_SO_PIN=1234 1. softhsm2-util --init-token --free --label softhsm --pin $GNUTLS_PIN --so-pin $GNUTLS_SO_PIN 2. p11tool --so-login --batch --label '$CA_LABEL' --mark-trusted --mark-ca --load-certificate <<CAcert>> --write '<<token>>' 3. p11tool --login --batch --delete '<<CERT URL>>' Actual results: Error in pkcs11_delete:82: Error in provided PIN. Expected results: If it's possible to delete certificate without --login, it should be probably also possible with it. Or the error message should give some good reason why it does not work.
There is something strange there. What is the use case handled? You write as a security officer, and you try to delete as a user. Is that the intention?
Removing worked with neither --login nor --so-login. It only works without any of these arguments.
That may be a quirk of softhsm2 and p11tool may not be the right place to address that. Do you see the same behavior if you use pkcs11-tool from opensc?
I can delete fine with pkcs11-tool --module /usr/lib64/pkcs11/libsofthsm2.so --delete-object --type cert --label 'Example CA' --pin 1234 -v --login I think that might have been the reason why I filed this bug for 'gnutls' component.
https://gitlab.com/gnutls/gnutls/merge_requests/583
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:3050