That is, do not reset it when completing it so that we can
use the negotiated extensions even after the handshake is
complete.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
return NULL;
}
-/* Checks if the extension we just received is one of the
- * requested ones. Otherwise it's a fatal error.
+/* Checks if the extension @type provided has been requested
+ * by us (in client side). In that case it returns zero,
+ * otherwise a negative error value.
*/
int
_gnutls_extension_list_check(gnutls_session_t session, uint16_t type)
if (session->internals.priorities.protocol.algorithms == 0)
return gnutls_assert_val(GNUTLS_E_NO_PRIORITIES_WERE_SET);
+ session->internals.extensions_sent_size = 0;
session->internals.handshake_in_progress = 1;
session->internals.vc_status = -1;
gettime(&session->internals.handshake_start_time);
*/
static void _gnutls_handshake_internal_state_init(gnutls_session_t session)
{
- session->internals.extensions_sent_size = 0;
-
/* by default no selected certificate */
session->internals.adv_version_major = 0;
session->internals.adv_version_minor = 0;
_gnutls_handshake_internal_state_init(*session);
+ (*session)->internals.extensions_sent_size = 0;
+
/* emulate old gnutls behavior for old applications that do not use the priority_*
* functions.
*/