diff options
author | lloyd <[email protected]> | 2011-05-03 16:54:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-05-03 16:54:40 +0000 |
commit | 113c2917a653a4f8f9fa167bc19d38c633c69707 (patch) | |
tree | ba659dc82ec8bb15822116a4626d34278235e36c /doc | |
parent | 8843bede27531c936b70fd2e869ff4f1dbc7c3c1 (diff) |
Basic ref on SSL clients
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ssl.txt | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/doc/ssl.txt b/doc/ssl.txt index 26954d6a4..adca78bf8 100644 --- a/doc/ssl.txt +++ b/doc/ssl.txt @@ -17,7 +17,35 @@ feature macro ``BOTAN_HAS_SSL_TLS`` to check. TLS Clients ---------------------------------------- -A simple TLS client: +.. cpp:class:: TLS_Client + + .. cpp:function:: TLS_Client( \ + 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) + + Creates a TLS client. It will call *input_fn* to read bytes from + the network and call *output_fn* when bytes need to be written to + the network. + + .. cpp:function:: size_t read(byte* buf, size_t buf_len) + + Reads up to *buf_len* bytes from the open connection into *buf*, + returning the number of bytes actually written. + + .. cpp:function:: void write(const byte* buf, size_t buf_len) + + Writes *buf_len* bytes in *buf* to the remote side + + .. cpp:function:: void close() + + Closes the connection + + .. cpp:function:: std::vector<X509_Certificate> peer_cert_chain() + + Returns the certificate chain of the server + +A simple TLS client example: .. literalinclude:: examples/tls_client.cpp |