From b500ef1a58f977f5ce5869e7160615f7b44876e7 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 29 Dec 2011 17:18:56 +0000 Subject: Add support for sending server name indicator in client hello Add support for sending and reading the SRP identifier extension. Add some helper classes for managing TLS extensions Add ciphersuite codes for SRP key exchange. --- doc/examples/tls_client.cpp | 4 +++- doc/examples/tls_server.cpp | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp index b44dbf7d5..1d62bbc20 100644 --- a/doc/examples/tls_client.cpp +++ b/doc/examples/tls_client.cpp @@ -35,7 +35,9 @@ class HTTPS_Client std::tr1::bind(&HTTPS_Client::proc_data, std::tr1::ref(*this), _1, _2, _3), sessions, policy, - rng) + rng, + host, + host + "_username") { SecureVector socket_buf(1024); size_t desired = 0; diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp index e63565fc0..f43af1dcf 100644 --- a/doc/examples/tls_server.cpp +++ b/doc/examples/tls_server.cpp @@ -77,6 +77,7 @@ class Blocking_TLS_Server if(socket_got == 0) // eof? { close(); + printf("got eof on socket\n"); exit = true; } @@ -88,8 +89,8 @@ class Blocking_TLS_Server { if(buf_len == 0 && alert_code != NULL_ALERT) { - printf("Alert: %d, quitting\n", alert_code); - exit = true; + printf("Alert: %d\n", alert_code); + //exit = true; } printf("Got %d bytes: ", (int)buf_len); @@ -141,8 +142,8 @@ int main(int argc, char* argv[]) AutoSeeded_RNG rng; - //RSA_PrivateKey key(rng, 1024); - DSA_PrivateKey key(rng, DL_Group("dsa/jce/1024")); + RSA_PrivateKey key(rng, 1024); + //DSA_PrivateKey key(rng, DL_Group("dsa/jce/1024")); X509_Cert_Options options( "localhost/US/Syn Ack Labs/Mathematical Munitions Dept"); -- cgit v1.2.3