diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 0ee77c83c..7f16e5ec3 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -705,6 +705,9 @@ SymmetricKey Channel::key_material_export(const std::string& label, { if(auto active = active_state()) { + if(pending_state() != nullptr) + throw Invalid_State("Channel::key_material_export cannot export during renegotiation"); + std::unique_ptr<KDF> prf(active->protocol_specific_prf()); const secure_vector<uint8_t>& master_secret = |