diff options
author | lloyd <[email protected]> | 2014-10-31 10:18:47 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-10-31 10:18:47 +0000 |
commit | 05d29e973175889685a695d34cf810992497b316 (patch) | |
tree | 1863a1819f3c02a5b27f6f9266ce2c31bf408ab5 /src/cmd | |
parent | 8916b9e071503bc8033370c9806075e0b083e84d (diff) |
Add TLS fallback signalling (draft-ietf-tls-downgrade-scsv-00)
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/tls_client.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cmd/tls_client.cpp b/src/cmd/tls_client.cpp index 18b8044b5..9130cd085 100644 --- a/src/cmd/tls_client.cpp +++ b/src/cmd/tls_client.cpp @@ -158,7 +158,7 @@ int tls_client_main(int argc, char* argv[]) std::string host = argv[1]; u32bit port = argc >= 3 ? Botan::to_u32bit(argv[2]) : 443; - std::string transport = argc >= 4 ? argv[3] : "tcp"; + const std::string transport = argc >= 4 ? argv[3] : "tcp"; int sockfd = connect_to_host(host, port, transport); @@ -167,10 +167,7 @@ int tls_client_main(int argc, char* argv[]) std::bind(stream_socket_write, sockfd, _1, _2) : std::bind(dgram_socket_write, sockfd, _1, _2); - auto version = - (transport == "tcp") ? - TLS::Protocol_Version::latest_tls_version() : - TLS::Protocol_Version::latest_dtls_version(); + auto version = policy.latest_supported_version(transport != "tcp"); TLS::Client client(socket_write, process_data, |