diff options
author | lloyd <[email protected]> | 2010-10-29 13:11:44 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 13:11:44 +0000 |
commit | 6c24ca7ebd1e1eae2c32c1306a22758ef3d656ff (patch) | |
tree | 107b56e3d5b4e6be002a992682bdd86c1881e08d /src/ssl/tls_server.h | |
parent | 2e89e24a4b35172eab4799a3243263bca950a9d2 (diff) |
Remove socket dependency from TLS_Server, instead interacting with
generic std::functions for I/O
Diffstat (limited to 'src/ssl/tls_server.h')
-rw-r--r-- | src/ssl/tls_server.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ssl/tls_server.h b/src/ssl/tls_server.h index 09a1ef40b..69ccf46e8 100644 --- a/src/ssl/tls_server.h +++ b/src/ssl/tls_server.h @@ -11,7 +11,6 @@ #include <botan/tls_connection.h> #include <botan/tls_record.h> #include <botan/tls_policy.h> -#include <botan/socket.h> #include <vector> namespace Botan { @@ -34,11 +33,14 @@ class BOTAN_DLL TLS_Server : public TLS_Connection void close(); bool is_closed() const; - // FIXME: support cert chains (!) - // FIXME: support anonymous servers - TLS_Server(const TLS_Policy& policy, + /* + * FIXME: support cert chains (!) + * FIXME: support anonymous servers + */ + TLS_Server(std::tr1::function<size_t (byte[], size_t)> input_fn, + std::tr1::function<void (const byte[], size_t)> output_fn, + const TLS_Policy& policy, RandomNumberGenerator& rng, - Socket& peer, const X509_Certificate& cert, const Private_Key& cert_key); @@ -52,9 +54,10 @@ class BOTAN_DLL TLS_Server : public TLS_Connection void process_handshake_msg(Handshake_Type, const MemoryRegion<byte>&); + std::tr1::function<size_t (byte[], size_t)> input_fn; + const TLS_Policy& policy; RandomNumberGenerator& rng; - Socket& peer; Record_Writer writer; Record_Reader reader; |