Skip to content

Commit

Permalink
Merge pull request #102 from bellgrim/SOFTHSM-108
Browse files Browse the repository at this point in the history
SOFTHSM-108: A marked as trusted certificate cannot be imported.
  • Loading branch information
jschlyter committed Jan 25, 2015
2 parents 34d647e + 79b2560 commit bea4756
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions NEWS
@@ -1,5 +1,11 @@
NEWS for SoftHSM -- History of user visible changes

SoftHSM develop

Bugfixes:
* SOFTHSM-108: A marked as trusted certificate cannot be imported.


SoftHSM 2.0.0b2 - 2014-12-28

* SOFTHSM-50: OpenSSL FIPS support.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/P11Attributes.cpp
Expand Up @@ -401,7 +401,7 @@ CK_RV P11Attribute::update(Token* token, bool isPrivate, CK_VOID_PTR pValue, CK_
}

// Attributes cannot be modified if CKA_TRUSTED is true on a certificate object.
if (isTrusted()) {
if (isTrusted() && op != OBJECT_OP_GENERATE && op != OBJECT_OP_CREATE) {
if (osobject->getUnsignedLongValue(CKA_CLASS, CKO_VENDOR_DEFINED) == CKO_CERTIFICATE)
{
ERROR_MSG("A trusted certificate cannot be modified");
Expand Down

0 comments on commit bea4756

Please sign in to comment.