diff options
Diffstat (limited to 'src/tls/c_kex.cpp')
-rw-r--r-- | src/tls/c_kex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tls/c_kex.cpp b/src/tls/c_kex.cpp index 36fc39b34..58e458e81 100644 --- a/src/tls/c_kex.cpp +++ b/src/tls/c_kex.cpp @@ -286,10 +286,10 @@ Client_Key_Exchange::Client_Key_Exchange(const MemoryRegion<byte>& contents, if(psk.length() == 0) { if(policy.hide_unknown_users()) + psk = SymmetricKey(rng, 16); + else throw TLS_Exception(Alert::UNKNOWN_PSK_IDENTITY, "No PSK for identifier " + psk_identity); - else - psk = SymmetricKey(rng, 16); } } |