Skip to content

Commit

Permalink
Merge pull request opendnssec#674 from opendnssec/fix_673
Browse files Browse the repository at this point in the history
Fix broken if statement (fixes opendnssec#673)
  • Loading branch information
rijswijk authored Apr 6, 2022
2 parents 28c67fe + e5d930a commit ac70dc3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/lib/SoftHSM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 NLnet Labs
* Copyright (c) 2010 SURFnet bv
* Copyright (c) 2010 .SE (The Internet Infrastructure Foundation)
* All rights reserved.
Expand Down Expand Up @@ -7122,8 +7123,10 @@ CK_RV SoftHSM::C_UnwrapKey
{
OSObject* osobject = (OSObject*)handleManager->getObject(*hKey);
if (osobject == NULL_PTR || !osobject->isValid())
{
rv = CKR_FUNCTION_FAILED;
if (osobject->startTransaction())
}
else if (osobject->startTransaction())
{
bool bOK = true;

Expand Down Expand Up @@ -7781,9 +7784,12 @@ CK_RV SoftHSM::generateAES
if (rv == CKR_OK)
{
OSObject* osobject = (OSObject*)handleManager->getObject(*phKey);
if (osobject == NULL_PTR || !osobject->isValid()) {
if (osobject == NULL_PTR || !osobject->isValid())
{
rv = CKR_FUNCTION_FAILED;
} else if (osobject->startTransaction()) {
}
else if (osobject->startTransaction())
{
bool bOK = true;

// Common Attributes
Expand Down

0 comments on commit ac70dc3

Please sign in to comment.