diff options
author | Daiki Ueno <dueno@redhat.com> | 2020-03-24 17:51:56 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2020-05-12 11:12:05 +0200 |
commit | bb3e18e90697cfb2a583aab62aa3ae2b4552b974 (patch) | |
tree | f022eaec6be2d67dbc64a475795301a30b4f7a1e /lib/state.c | |
parent | 0958603e5a827468f2d8a7b8b6e662fb9d3a7909 (diff) | |
download | gnutls-tmp-quic.tar.gz |
alert: add callback to intercept alert messagestmp-quic
This adds gnutls_alert_set_read_function(), to allow QUIC
implementations to be notified when an alert message is sent.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib/state.c')
-rw-r--r-- | lib/state.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/state.c b/lib/state.c index b751735e5a..6a96f05c15 100644 --- a/lib/state.c +++ b/lib/state.c @@ -1480,6 +1480,23 @@ gnutls_handshake_set_read_function(gnutls_session_t session, } /** + * gnutls_alert_set_read_function: + * @session: is #gnutls_session_t type + * @func: is the function to be called + * + * This function will set a callback to be called when an alert + * message is being sent. + * + * Since: 3.6.14 + */ +void +gnutls_alert_set_read_function(gnutls_session_t session, + gnutls_alert_read_func func) +{ + session->internals.a_read_func = func; +} + +/** * gnutls_record_get_state: * @session: is a #gnutls_session_t type * @read: if non-zero the read parameters are returned, otherwise the write |