diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-11-02 15:19:10 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:36 +0100 |
commit | c0be323b29c0c31b7bc307f03df7db14816b0c48 (patch) | |
tree | 92469b39093ec6ab17f7f8c6c1227158e11f0e49 /lib/state.c | |
parent | 9ec15a01ee5982706adc92a938304eeb8a3de60a (diff) | |
download | gnutls-c0be323b29c0c31b7bc307f03df7db14816b0c48.tar.gz |
handshake: added support for post-handshake authentication
That is:
* introduced a gnutls_init() flag for clients to enable post-handshake
authentication
* introduced gnutls_reauth() function, to be called by servers to request
authentication, and by clients to perform authentication
Resolves #562
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/state.c')
-rw-r--r-- | lib/state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/state.c b/lib/state.c index c90adbb551..889b3190c0 100644 --- a/lib/state.c +++ b/lib/state.c @@ -291,10 +291,12 @@ int gnutls_init(gnutls_session_t * session, unsigned int flags) /* Initialize buffers */ _gnutls_buffer_init(&(*session)->internals.handshake_hash_buffer); + _gnutls_buffer_init(&(*session)->internals.post_handshake_hash_buffer); _gnutls_buffer_init(&(*session)->internals.hb_remote_data); _gnutls_buffer_init(&(*session)->internals.hb_local_data); _gnutls_buffer_init(&(*session)->internals.record_presend_buffer); _gnutls_buffer_init(&(*session)->internals.record_key_update_buffer); + _gnutls_buffer_init(&(*session)->internals.reauth_buffer); _mbuffer_head_init(&(*session)->internals.record_buffer); _mbuffer_head_init(&(*session)->internals.record_send_buffer); @@ -410,10 +412,12 @@ void gnutls_deinit(gnutls_session_t session) } _gnutls_buffer_clear(&session->internals.handshake_hash_buffer); + _gnutls_buffer_clear(&session->internals.post_handshake_hash_buffer); _gnutls_buffer_clear(&session->internals.hb_remote_data); _gnutls_buffer_clear(&session->internals.hb_local_data); _gnutls_buffer_clear(&session->internals.record_presend_buffer); _gnutls_buffer_clear(&session->internals.record_key_update_buffer); + _gnutls_buffer_clear(&session->internals.reauth_buffer); _mbuffer_head_clear(&session->internals.record_buffer); _mbuffer_head_clear(&session->internals.record_recv_buffer); @@ -423,6 +427,7 @@ void gnutls_deinit(gnutls_session_t session) _gnutls_free_datum(&session->internals.dtls.dcookie); gnutls_free(session->internals.rexts); + gnutls_free(session->internals.post_handshake_cr_context.data); gnutls_free(session->internals.rsup); |