Skip to content

Commit ac70dc3

Browse files
authored
Merge pull request #674 from opendnssec/fix_673
Fix broken if statement (fixes #673)
2 parents 28c67fe + e5d930a commit ac70dc3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/lib/SoftHSM.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2022 NLnet Labs
23
* Copyright (c) 2010 SURFnet bv
34
* Copyright (c) 2010 .SE (The Internet Infrastructure Foundation)
45
* All rights reserved.
@@ -7122,8 +7123,10 @@ CK_RV SoftHSM::C_UnwrapKey
71227123
{
71237124
OSObject* osobject = (OSObject*)handleManager->getObject(*hKey);
71247125
if (osobject == NULL_PTR || !osobject->isValid())
7126+
{
71257127
rv = CKR_FUNCTION_FAILED;
7126-
if (osobject->startTransaction())
7128+
}
7129+
else if (osobject->startTransaction())
71277130
{
71287131
bool bOK = true;
71297132

@@ -7781,9 +7784,12 @@ CK_RV SoftHSM::generateAES
77817784
if (rv == CKR_OK)
77827785
{
77837786
OSObject* osobject = (OSObject*)handleManager->getObject(*phKey);
7784-
if (osobject == NULL_PTR || !osobject->isValid()) {
7787+
if (osobject == NULL_PTR || !osobject->isValid())
7788+
{
77857789
rv = CKR_FUNCTION_FAILED;
7786-
} else if (osobject->startTransaction()) {
7790+
}
7791+
else if (osobject->startTransaction())
7792+
{
77877793
bool bOK = true;
77887794

77897795
// Common Attributes

0 commit comments

Comments
 (0)