Skip to content

Commit 5fac462

Browse files
author
Antoine Lochet
committed
Fixed compilation when ML-DSA is not supported
1 parent 0d7dbc7 commit 5fac462

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/lib/SoftHSM.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6299,6 +6299,7 @@ CK_RV SoftHSM::C_GenerateKeyPair
62996299
ispublicKeyToken, ispublicKeyPrivate, isprivateKeyToken, isprivateKeyPrivate);
63006300
}
63016301

6302+
#ifdef WITH_ML_DSA
63026303
if (pMechanism->mechanism == CKM_ML_DSA_KEY_PAIR_GEN)
63036304
{
63046305
return this->generateMLDSA(hSession,
@@ -6307,7 +6308,7 @@ CK_RV SoftHSM::C_GenerateKeyPair
63076308
phPublicKey, phPrivateKey,
63086309
ispublicKeyToken, ispublicKeyPrivate, isprivateKeyToken, isprivateKeyPrivate);
63096310
}
6310-
6311+
#endif
63116312
return CKR_GENERAL_ERROR;
63126313
}
63136314

@@ -10017,6 +10018,7 @@ CK_RV SoftHSM::generateED
1001710018
return rv;
1001810019
}
1001910020

10021+
#ifdef WITH_ML_DSA
1002010022
// Generate an MLDSA key pair
1002110023
CK_RV SoftHSM::generateMLDSA
1002210024
(CK_SESSION_HANDLE hSession,
@@ -10275,6 +10277,7 @@ CK_RV SoftHSM::generateMLDSA
1027510277

1027610278
return rv;
1027710279
}
10280+
#endif
1027810281

1027910282
// Generate a DH key pair
1028010283
CK_RV SoftHSM::generateDH

0 commit comments

Comments
 (0)