diff options
author | lloyd <[email protected]> | 2012-01-23 21:52:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-23 21:52:02 +0000 |
commit | d8dbd9556b2ebb50ae4acaeff1b79ef346f07e71 (patch) | |
tree | 6decb137353c60f0925f1c0c9826c8712459147e /doc/examples | |
parent | 01039638f8b5387540c4bacd4d236a8b8e806d0f (diff) |
Update examples with new ciphersuite string printer
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/tls_client.cpp | 5 | ||||
-rw-r--r-- | doc/examples/tls_server.cpp | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp index 3d4dd38b7..000f63ed4 100644 --- a/doc/examples/tls_client.cpp +++ b/doc/examples/tls_client.cpp @@ -75,9 +75,8 @@ int connect_to_host(const std::string& host, u16bit port) bool handshake_complete(const TLS::Session& session) { std::cout << "Handshake complete!\n"; - std::cout << "Protocol version " << (int)session.major_version() - << "." << (int)session.minor_version() << "\n"; - std::cout << "Ciphersuite " << std::hex << session.ciphersuite() << "\n"; + std::cout << "Protocol version " << session.version().to_string() << "\n"; + std::cout << "Ciphersuite " << std::hex << session.ciphersuite().to_string() << "\n"; std::cout << "Session ID " << hex_encode(session.session_id()) << "\n"; return true; diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp index 6f986c7a1..0f6287599 100644 --- a/doc/examples/tls_server.cpp +++ b/doc/examples/tls_server.cpp @@ -54,8 +54,8 @@ class Credentials_Manager_Simple : public Credentials_Manager bool handshake_complete(const TLS::Session& session) { - printf("Handshake complete, protocol=%04X ciphersuite=%04X compression=%d\n", - session.version(), session.ciphersuite(), + printf("Handshake complete, protocol=%04X ciphersuite=%s compression=%d\n", + session.version(), session.ciphersuite().to_string().c_str(), session.compression_method()); printf("Session id = %s\n", hex_encode(session.session_id()).c_str()); |