diff options
author | Jack Lloyd <[email protected]> | 2016-02-07 05:10:18 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-02-07 05:10:18 -0500 |
commit | 62a03ea81ab7a2fe8ff79275427f3353a75e3a4f (patch) | |
tree | 22134859fa408e5d1ea6d8d1d4a5198c665e48aa /src/lib/tls/tls_server.cpp | |
parent | 0ed7333721b8205c2b4b281b6cd5c762754fbe7d (diff) |
Make SRP6 support optional in TLS
Remove SRP_SHA from the default policy, since normal applications do
not need it.
Removes nullptr initializers of unique_ptrs in the Server_Key_Exchange
constructor, that's the default unique_ptr already.
Diffstat (limited to 'src/lib/tls/tls_server.cpp')
-rw-r--r-- | src/lib/tls/tls_server.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp index 6aed40479..5ababe621 100644 --- a/src/lib/tls/tls_server.cpp +++ b/src/lib/tls/tls_server.cpp @@ -84,12 +84,14 @@ bool check_for_resume(Session& session_info, session_info.compression_method())) return false; +#if defined(BOTAN_HAS_SRP6) // client sent a different SRP identity if(client_hello->srp_identifier() != "") { if(client_hello->srp_identifier() != session_info.srp_identifier()) return false; } +#endif // client sent a different SNI hostname if(client_hello->sni_hostname() != "") @@ -160,6 +162,7 @@ u16bit choose_ciphersuite( if(suite.sig_algo() != "" && cert_chains.count(suite.sig_algo()) == 0) continue; +#if defined(BOTAN_HAS_SRP6) /* The client may offer SRP cipher suites in the hello message but omit the SRP extension. If the server would like to select an @@ -171,6 +174,7 @@ u16bit choose_ciphersuite( if(suite.kex_algo() == "SRP_SHA" && client_hello->srp_identifier() == "") throw TLS_Exception(Alert::UNKNOWN_PSK_IDENTITY, "Client wanted SRP but did not send username"); +#endif return suite_id; } |