aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-20 21:25:22 +0000
committerlloyd <[email protected]>2012-01-20 21:25:22 +0000
commit00cc9cd8e59c117fc03c56f2363267f286c1faef (patch)
tree7a1a092775d2a621ffe53d4ebcf8e5046517420a /doc/examples
parent27ff086c66b8c4e5e99db5e30c23530be82f5a94 (diff)
Cast to int, cout gets confused by unsigned char
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/tls_client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp
index 29a5414e1..42fecaf37 100644
--- a/doc/examples/tls_client.cpp
+++ b/doc/examples/tls_client.cpp
@@ -23,7 +23,7 @@ using namespace std::tr1::placeholders;
class Client_TLS_Policy : public TLS_Policy
{
public:
- Version_Code pref_version() const { return TLS_V12; }
+ //Version_Code pref_version() const { return TLS_V12; }
bool check_cert(const std::vector<X509_Certificate>& certs) const
{
@@ -75,8 +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 " << session.major_version()
- << "." << session.minor_version() << "\n";
+ std::cout << "Protocol version " << (int)session.major_version()
+ << "." << (int)session.minor_version() << "\n";
std::cout << "Session ID " << hex_encode(session.session_id()) << "\n";
return true;