5 #ifndef CRYPTOPP_IMPORTS 15 #ifndef CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 16 #define CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 0 19 #if (CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 && !defined(THREADS_AVAILABLE)) 20 #error FIPS 140-2 compliance requires the availability of thread local storage. 23 #if (CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 && !defined(OS_RNG_AVAILABLE)) 24 #error FIPS 140-2 compliance requires the availability of OS provided RNG. 44 #if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 45 ThreadLocalStorage & AccessPowerUpSelfTestInProgress()
47 static ThreadLocalStorage selfTestInProgress;
48 return selfTestInProgress;
54 #if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 55 return AccessPowerUpSelfTestInProgress().GetValue() != NULL;
65 #if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 66 AccessPowerUpSelfTestInProgress().SetValue((
void *)inProgress);
73 #if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 81 #if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 void SignaturePairwiseConsistencyTest(const PK_Signer &signer, const PK_Verifier &verifier)
Utility functions for the Crypto++ library.
void SignaturePairwiseConsistencyTest_FIPS_140_Only(const PK_Signer &signer, const PK_Verifier &verifier)
PowerUpSelfTestStatus g_powerUpSelfTestStatus
#define NAMESPACE_BEGIN(x)
bool FIPS_140_2_ComplianceEnabled()
Determines whether the library provides FIPS validated cryptography.
Interface for public-key signers.
Interface for public-key encryptors.
PowerUpSelfTestStatus CRYPTOPP_API GetPowerUpSelfTestStatus()
Provides the current power-up self test status.
The self tests were executed via DoPowerUpSelfTest() or DoDllPowerUpSelfTest(), but the result was fa...
void EncryptionPairwiseConsistencyTest(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor)
void SetPowerUpSelfTestInProgressOnThisThread(bool inProgress)
#define CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
Interface for public-key decryptors.
void EncryptionPairwiseConsistencyTest_FIPS_140_Only(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor)
void SimulatePowerUpSelfTestFailure()
Sets the power-up self test status to POWER_UP_SELF_TEST_FAILED.
#define CRYPTOPP_ASSERT(exp)
The self tests have not been performed.
Interface for public-key signature verifiers.
Classes and functions for the FIPS 140-2 validated library.
#define CRYPTOPP_UNUSED(x)
PowerUpSelfTestStatus
Status of the power-up self test.
bool PowerUpSelfTestInProgressOnThisThread()