diff options
-rw-r--r-- | doc/manual/tls.rst | 68 | ||||
-rw-r--r-- | doc/manual/x509.rst | 6 | ||||
-rw-r--r-- | src/lib/cert/x509/x509cert.cpp | 6 | ||||
-rw-r--r-- | src/lib/cert/x509/x509cert.h | 4 |
4 files changed, 35 insertions, 49 deletions
diff --git a/doc/manual/tls.rst b/doc/manual/tls.rst index 554846c25..4226f3694 100644 --- a/doc/manual/tls.rst +++ b/doc/manual/tls.rst @@ -194,19 +194,20 @@ TLS Clients .. cpp:class:: TLS::Client - .. cpp:function:: TLS::Client( \ - output_fn output, \ - data_cb data, \ - alert_cb alert, \ - handshake_cb handshake_complete, \ - TLS::Session_Manager& session_manager, \ - Credentials_Manager& credendials_manager, \ - const TLS::Policy& policy, \ - RandomNumberGenerator& rng, \ - const Server_Information& server_info, \ - const Protocol_Version offer_version, \ - const std::vector<std::string>& app_protocols, - size_t reserved_io_buffer_size) + .. cpp:function:: Client( \ + output_fn out, \ + data_cb app_data_cb, \ + alert_cb alert_cb, \ + handshake_cb hs_cb, \ + Session_Manager& session_manager, \ + Credentials_Manager& creds, \ + const Policy& policy, \ + RandomNumberGenerator& rng, \ + const Server_Information& server_info = Server_Information(), \ + const Protocol_Version offer_version = Protocol_Version::latest_tls_version(), \ + const std::vector<std::string>& next_protocols = {}, \ + size_t reserved_io_buffer_size = 16*1024 \ + ) Initialize a new TLS client. The constructor will immediately initiate a new session. @@ -284,20 +285,21 @@ TLS Servers .. cpp:class:: TLS::Server - .. cpp:function:: TLS::Server( \ - std::function<void, const byte*, size_t> output_fn, \ - std::function<void, const byte*, size_t> data_cb, \ - std::function<TLS::Alert, const byte*, size_t> alert_cb, \ - TLS::Session_Manager& session_manager, \ - Credentials_Manager& creds, \ - const TLS::Policy& policy, \ - RandomNumberGenerator& rng, \ - std::function<std::string, std::vector<std::string> > proto_chooser, - const std::vector<std::string>& protocols, \ - bool is_datagram = false, \ - bool reserved_io_buffer_size) - -The first 7 arguments as well as the final argument + .. cpp:function:: Server( \ + output_fn output, \ + data_cb data_cb, \ + alert_cb alert_cb, \ + handshake_cb handshake_cb, \ + Session_Manager& session_manager, \ + Credentials_Manager& creds, \ + const Policy& policy, \ + RandomNumberGenerator& rng, \ + next_protocol_fn next_proto = next_protocol_fn(), \ + bool is_datagram = false, \ + size_t reserved_io_buffer_size = 16*1024 \ + ) + +The first 8 arguments as well as the final argument *reserved_io_buffer_size*, are treated similiarly to the :ref:`client <tls_client>`. @@ -742,20 +744,10 @@ The ``TLS::Protocol_Version`` class represents a specific version: .. cpp:class:: TLS::Protocol_Version - .. cpp:type:: enum Version_Code + .. cpp:enum:: Version_Code ``TLS_V10``, ``TLS_V11``, ``TLS_V12``, ``DTLS_V10``, ``DTLS_V12`` - .. cpp:function:: static Protocol_Version latest_tls_version() - - Returns the latest version of TLS supported by this implementation - (currently TLS v1.2) - - .. cpp:function:: static Protocol_Version latest_dtls_version() - - Returns the latest version of DTLS supported by this implementation - (currently DTLS v1.2) - .. cpp:function:: Protocol_Version(Version_Code named_version) Create a specific version diff --git a/doc/manual/x509.rst b/doc/manual/x509.rst index d4500d692..84263ae3d 100644 --- a/doc/manual/x509.rst +++ b/doc/manual/x509.rst @@ -20,13 +20,13 @@ in the :doc:`tls` protocol. A X.509 certificate is represented by Returns the public key of the subject - .. cpp:function:: X509_DN subject_dn() const + .. cpp:function:: X509_DN issuer_dn() const - Returns the distinguished name of the issuer + Returns the distinguished name (DN) of the certificate's issuer .. cpp:function:: X509_DN subject_dn() const - Returns the distinguished name of the issuer + Returns the distinguished name (DN) of the certificate's subject .. cpp:function:: std::string start_time() const diff --git a/src/lib/cert/x509/x509cert.cpp b/src/lib/cert/x509/x509cert.cpp index 48e437352..43bf1099d 100644 --- a/src/lib/cert/x509/x509cert.cpp +++ b/src/lib/cert/x509/x509cert.cpp @@ -310,9 +310,6 @@ std::vector<byte> X509_Certificate::serial_number() const return subject.get1_memvec("X509.Certificate.serial"); } -/* -* Return the distinguished name of the issuer -*/ X509_DN X509_Certificate::issuer_dn() const { return create_dn(issuer); @@ -323,9 +320,6 @@ std::vector<byte> X509_Certificate::raw_issuer_dn() const return issuer.get1_memvec("X509.Certificate.dn_bits"); } -/* -* Return the distinguished name of the subject -*/ X509_DN X509_Certificate::subject_dn() const { return create_dn(subject); diff --git a/src/lib/cert/x509/x509cert.h b/src/lib/cert/x509/x509cert.h index 9fd3e660a..1a46d290f 100644 --- a/src/lib/cert/x509/x509cert.h +++ b/src/lib/cert/x509/x509cert.h @@ -37,13 +37,13 @@ class BOTAN_DLL X509_Certificate : public X509_Object std::vector<byte> subject_public_key_bits() const; /** - * Get the issuer certificate DN. + * Get the certificate's issuer distinguished name (DN). * @return issuer DN of this certificate */ X509_DN issuer_dn() const; /** - * Get the subject certificate DN. + * Get the certificate's subject distinguished name (DN). * @return subject DN of this certificate */ X509_DN subject_dn() const; |