aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHannes Rantzsch <[email protected]>2019-06-04 09:46:36 +0200
committerHannes Rantzsch <[email protected]>2019-06-04 10:58:03 +0200
commit54d1dcfaab369aa764b6dadce5310634da26a15e (patch)
tree27da50c5e09ea4decada5d5717230d234174eba0 /src
parent99c518962c561cffc3f53ae7f249445ab4576aa1 (diff)
Update comments as suggested per review
Co-Authored-By: RenĂ© Meusel <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/lib/tls/asio/asio_context.h8
-rw-r--r--src/lib/tls/asio/asio_stream.h15
2 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/tls/asio/asio_context.h b/src/lib/tls/asio/asio_context.h
index 63dc55197..c61086497 100644
--- a/src/lib/tls/asio/asio_context.h
+++ b/src/lib/tls/asio/asio_context.h
@@ -46,6 +46,10 @@ class Context
public:
// statically extract the function signature type from Callbacks::tls_verify_cert_chain
// and reuse it as an std::function<> for the verify callback signature
+ /**
+ * The signature of the callback function should correspond to the signature of
+ * Callbacks::tls_verify_cert_chain
+ */
using Verify_Callback =
detail::fn_signature_helper<decltype(&Callbacks::tls_verify_cert_chain)>::type;
@@ -72,6 +76,8 @@ class Context
* This changes the verify_callback in the stream's TLS::Context, and hence the tls_verify_cert_chain callback
* used in the handshake.
* Using this function is equivalent to setting the callback via @see Botan::TLS::Stream::set_verify_callback
+ *
+ * @note This function should only be called before initiating the TLS handshake
*/
void set_verify_callback(Verify_Callback callback)
{
@@ -93,8 +99,8 @@ class Context
Server_Information serverInfo;
Verify_Callback verifyCallback;
-
};
+
} // namespace TLS
} // namespace Botan
diff --git a/src/lib/tls/asio/asio_stream.h b/src/lib/tls/asio/asio_stream.h
index 59776d1bd..8fd309bc7 100644
--- a/src/lib/tls/asio/asio_stream.h
+++ b/src/lib/tls/asio/asio_stream.h
@@ -55,8 +55,8 @@ class Stream
/**
* @brief Construct a new Stream
*
- * @param context The context parameter is be used to set up the underlying native handle. Using code is
- * responsible for lifetime management of the context and must ensure that is is available for the
+ * @param context The context parameter is used to set up the underlying native handle. Using code is
+ * responsible for lifetime management of the context and must ensure that it is available for the
* lifetime of the stream.
* @param args Arguments to be forwarded to the construction of the next layer.
*/
@@ -75,8 +75,8 @@ class Stream
* Convenience overload for boost::asio::ssl::stream compatibility.
*
* @param arg This argument is forwarded to the construction of the next layer.
- * @param context The context parameter is be used to set up the underlying native handle. Using code is
- * responsible for lifetime management of the context and must ensure that is is available for the
+ * @param context The context parameter is used to set up the underlying native handle. Using code is
+ * responsible for lifetime management of the context and must ensure that is available for the
* lifetime of the stream.
*/
template <typename Arg>
@@ -125,6 +125,8 @@ class Stream
* This changes the verify_callback in the stream's TLS::Context, and hence the tls_verify_cert_chain callback
* used in the handshake.
* Using this function is equivalent to setting the callback via @see Botan::TLS::Context::set_verify_callback
+ *
+ * @note This function should only be called before initiating the TLS handshake
*/
void set_verify_callback(Context::Verify_Callback callback)
{
@@ -132,10 +134,7 @@ class Stream
}
/**
- * @brief Override the tls_verify_cert_chain callback
- *
- * This changes the verify_callback in the stream's TLS::Context, and hence the tls_verify_cert_chain callback
- * used in the handshake.
+ * @brief Compatibility overload of @ref set_verify_callback
*
* @param ec This parameter is unused.
*/