Trying to write a certificate in a softhsm db with CKA_CERTIFICATE_CATEGORY fails with: CKR_ATTRIBUTE_READ_ONLY How reproducible: 1. cat >config directories.tokendir = db objectstore.backend = file 2. export SOFTHSM2_CONF=config 3. mkdir db 4. softhsm2-util --init-token --slot 0 --label test --so-pin 1234 --pin 1234 5. p11tool --provider /usr/lib64/pkcs11/libsofthsm2.so --write --mark-ca --load-certificate any-cert.pem --label test --so-login Output: Error writing certificate: PKCS #11 error in attribute Expected Output: Success. Writing the same certificate without the mark-ca flag works fine. This is a regression from version 1, as this use case works properly with softhsmv1 in F20.
Created attachment 1083641 [details] pkcs11 spy output
https://github.com/opendnssec/SoftHSMv2/issues/162
Could that patch be included in F23? The gnutls PKCS#11 test suite depends on softhsm having this functionality and since the softhsm v1->v2 transition I cannot run this part of test suite in Fedora. https://github.com/opendnssec/SoftHSMv2/pull/164
We were going to wait for the next upstream release in 1-2 weeks, but I can do another build with just the patches for #162
softhsm-2.1.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c43dd0091f
softhsm-2.1.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-376bda6d1d
softhsm-2.1.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c43dd0091f
softhsm-2.1.0-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-376bda6d1d
softhsm-2.1.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
softhsm-2.1.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.