From 0351b5af3bebf5331743343203f4c857796630cb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 19 Jul 2021 17:46:58 +0200 Subject: [PATCH] key-exchange: Warn about costly operations in set_public_key() --- src/libstrongswan/crypto/key_exchange.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstrongswan/crypto/key_exchange.h b/src/libstrongswan/crypto/key_exchange.h index b55ed558e..70d6d4993 100644 --- a/src/libstrongswan/crypto/key_exchange.h +++ b/src/libstrongswan/crypto/key_exchange.h @@ -105,6 +105,10 @@ struct key_exchange_t { /** * Sets the public key from the peer. * + * @note This operation should be relatively quick. Costly public key + * validation operations or key derivation should be implemented in + * get_shared_secret(). + * * @param value public key of peer * @return TRUE if other public key verified and set */