From: Nikos Mavrogiannopoulos Date: Sat, 22 Feb 2014 17:31:08 +0000 (+0100) Subject: moved priorities check to the first call only. X-Git-Tag: gnutls_3_3_0pre0~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc7182404096cdfefec1abb3836a168b5eeecc48;p=thirdparty%2Fgnutls.git moved priorities check to the first call only. --- diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 49e8d8ae13..57fe496bfb 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2500,11 +2500,12 @@ int gnutls_handshake(gnutls_session_t session) /* sanity check. Verify that there are priorities setup. */ - if (session->internals.priorities.protocol.algorithms == 0) - return gnutls_assert_val(GNUTLS_E_NO_PRIORITIES_WERE_SET); if (STATE == STATE0) { /* first call */ + if (session->internals.priorities.protocol.algorithms == 0) + return gnutls_assert_val(GNUTLS_E_NO_PRIORITIES_WERE_SET); + gettime(&session->internals.dtls.handshake_start_time); if (session->internals.handshake_timeout_ms && session->internals.handshake_endtime == 0) @@ -2512,7 +2513,6 @@ int gnutls_handshake(gnutls_session_t session) session->internals.handshake_timeout_ms / 1000; } - ret = _gnutls_epoch_get(session, session->security_parameters.epoch_next,