diff options
author | lloyd <[email protected]> | 2010-04-20 00:08:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-04-20 00:08:34 +0000 |
commit | 0853502dc4f1491a1f2a3451e9900e36739c9e30 (patch) | |
tree | b79be8e6eada52f45bae39081098bff218b0fc5a /src/ssl/hello.cpp | |
parent | 030084de5ced0ce5c71376979146b6204f8f2aeb (diff) |
If we couldn't agree on a suite, fail immediately
Diffstat (limited to 'src/ssl/hello.cpp')
-rw-r--r-- | src/ssl/hello.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ssl/hello.cpp b/src/ssl/hello.cpp index b93234813..5b3c32278 100644 --- a/src/ssl/hello.cpp +++ b/src/ssl/hello.cpp @@ -241,6 +241,11 @@ Server_Hello::Server_Hello(RandomNumberGenerator& rng, } suite = policy->choose_suite(c_hello.ciphersuites(), have_rsa, have_dsa); + + if(suite == 0) + throw TLS_Exception(PROTOCOL_VERSION, + "Can't agree on a ciphersuite with client"); + comp_algo = policy->choose_compression(c_hello.compression_algos()); s_version = ver; |