Add configure option to disable testing key exchange methods
If this is used, the functionality to set a private key/value/seed for key exchange methods is removed (including from the interface to avoid accidentally forgetting to wrap implementations and uses of set_seed()). The set_seed() method is assigned outside the INIT() macro to avoid potentially undefined behavior (preprocessing directives in macro arguments). The test done by the crypto tester is a simple functionality test.
This commit is contained in:
@@ -153,6 +153,8 @@ struct key_exchange_t {
|
||||
bool (*get_public_key)(key_exchange_t *this, chunk_t *value)
|
||||
__attribute__((warn_unused_result));
|
||||
|
||||
#ifdef TESTABLE_KE
|
||||
|
||||
/**
|
||||
* Set a seed used for the derivation of private key material.
|
||||
*
|
||||
@@ -167,6 +169,8 @@ struct key_exchange_t {
|
||||
bool (*set_seed)(key_exchange_t *this, chunk_t value, drbg_t *drbg)
|
||||
__attribute__((warn_unused_result));
|
||||
|
||||
#endif /* TESTABLE_KE */
|
||||
|
||||
/**
|
||||
* Get the key exchange method used.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user