aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-29 17:18:56 +0000
committerlloyd <[email protected]>2011-12-29 17:18:56 +0000
commitb500ef1a58f977f5ce5869e7160615f7b44876e7 (patch)
tree025f3a6ee8b7da533178c2f7b3a351cb94750211 /doc/examples
parentcaa9dfa12cf69bb4ab88c399e61e856fedb24900 (diff)
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.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/tls_client.cpp4
-rw-r--r--doc/examples/tls_server.cpp9
2 files changed, 8 insertions, 5 deletions
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<byte> 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");