aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-10-28 15:54:48 -0400
committerJack Lloyd <[email protected]>2016-10-28 15:54:48 -0400
commita6b65a6f2a8cf019b6589aaee6c49cc125d76bce (patch)
tree2be492690139078e1079861c96f6d5e281a5e425 /src
parente70115926ffb2577736eb5fb6712f431d1438f2d (diff)
Add TLS callbacks for debug and error logging.
Not currently called but leaves us the opening to use them in the future without breaking ABI.
Diffstat (limited to 'src')
-rw-r--r--src/lib/tls/tls_callbacks.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/lib/tls/tls_callbacks.h b/src/lib/tls/tls_callbacks.h
index 17cd19b81..4a14055f9 100644
--- a/src/lib/tls/tls_callbacks.h
+++ b/src/lib/tls/tls_callbacks.h
@@ -99,9 +99,35 @@ class BOTAN_DLL Callbacks
virtual std::string tls_server_choose_app_protocol(const std::vector<std::string>& client_protos);
/**
- * Optional callback: debug logging. (not currently used)
+ * Optional callback: error logging. (not currently called)
+ * @param err An error message related to this connection.
*/
- virtual bool tls_log_debug(const char*) { return false; }
+ virtual void tls_log_error(const char* err)
+ {
+ BOTAN_UNUSED(err);
+ }
+
+ /**
+ * Optional callback: debug logging. (not currently called)
+ * @param what Some hopefully informative string
+ */
+ virtual void tls_log_debug(const char* what)
+ {
+ BOTAN_UNUSED(what);
+ }
+
+ /**
+ * Optional callback: debug logging taking a buffer. (not currently called)
+ * @param descr What this buffer is
+ * @param val the bytes
+ * @param val_len length of val
+ */
+ virtual void tls_log_debug_bin(const char* descr, const uint8_t val[], size_t val_len)
+ {
+ BOTAN_UNUSED(descr);
+ BOTAN_UNUSED(val);
+ BOTAN_UNUSED(val_len);
+ }
};
/**