aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/tls_client.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-17 13:55:23 +0000
committerlloyd <[email protected]>2010-09-17 13:55:23 +0000
commit8fa7d0b4f91eec572d8b2971d87e68741d1cd330 (patch)
tree6caf8dfc00dadc1000c73c3cf875430474153425 /src/ssl/tls_client.h
parentc037226de0af018187d03e7caaf6acb754fe1039 (diff)
Require a TLS_Policy
Diffstat (limited to 'src/ssl/tls_client.h')
-rw-r--r--src/ssl/tls_client.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/ssl/tls_client.h b/src/ssl/tls_client.h
index 14b3b6451..e59218892 100644
--- a/src/ssl/tls_client.h
+++ b/src/ssl/tls_client.h
@@ -33,21 +33,16 @@ class BOTAN_DLL TLS_Client : public TLS_Connection
void close();
bool is_closed() const;
- TLS_Client(RandomNumberGenerator& rng,
- Socket& peer,
- const TLS_Policy* policy = 0);
-
-#if 0
- void add_cert(const X509_Certificate& cert,
- const Private_Key& cert_key);
-#endif
+ TLS_Client(const TLS_Policy& policy,
+ RandomNumberGenerator& rng,
+ Socket& peer);
- // FIXME: support multiple cert/key pairs
- TLS_Client(RandomNumberGenerator& rng,
+ // FIXME: support multiple/arbitrary # of cert/key pairs
+ TLS_Client(const TLS_Policy& policy,
+ RandomNumberGenerator& rng,
Socket& peer,
const X509_Certificate& cert,
- const Private_Key& cert_key,
- const TLS_Policy* policy = 0);
+ const Private_Key& cert_key);
~TLS_Client();
private:
@@ -60,13 +55,12 @@ class BOTAN_DLL TLS_Client : public TLS_Connection
void read_handshake(byte, const MemoryRegion<byte>&);
void process_handshake_msg(Handshake_Type, const MemoryRegion<byte>&);
+ const TLS_Policy& policy;
RandomNumberGenerator& rng;
-
Socket& peer;
Record_Writer writer;
Record_Reader reader;
- const TLS_Policy* policy;
std::vector<X509_Certificate> certs, peer_certs;
std::vector<Private_Key*> keys;
@@ -74,7 +68,6 @@ class BOTAN_DLL TLS_Client : public TLS_Connection
class Handshake_State* state;
SecureVector<byte> session_id;
SecureQueue read_buf;
- std::string peer_id;
bool active;
};