aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/tls_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/tls_server.cpp')
-rw-r--r--doc/examples/tls_server.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp
index 057584677..bdc9c0b8a 100644
--- a/doc/examples/tls_server.cpp
+++ b/doc/examples/tls_server.cpp
@@ -57,6 +57,12 @@ class Blocking_TLS_Server
if(server.next_protocol() != "")
std::cout << "Next protocol: " << server.next_protocol() << "\n";
+ /*
+ std::vector<X509_Certificate> peer_certs = session.peer_certs();
+ if(peer_certs.size())
+ std::cout << peer_certs[0].to_string();
+ */
+
return true;
}
@@ -208,7 +214,9 @@ int main(int argc, char* argv[])
}
if(line == "reneg\n")
- tls.underlying().renegotiate();
+ tls.underlying().renegotiate(false);
+ else if(line == "RENEG\n")
+ tls.underlying().renegotiate(true);
line.clear();
}