diff options
-rw-r--r-- | lib/errors.c | 2 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 1 | ||||
-rw-r--r-- | lib/session_pack.c | 2 | ||||
-rw-r--r-- | tests/resume-with-false-start.c | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/lib/errors.c b/lib/errors.c index afa25ac0b8..021c1fcd40 100644 --- a/lib/errors.c +++ b/lib/errors.c @@ -386,6 +386,8 @@ static const gnutls_error_entry error_entries[] = { GNUTLS_E_UNRECOGNIZED_NAME), ERROR_ENTRY(N_("There was an issue converting to or from UTF8."), GNUTLS_E_IDNA_ERROR), + ERROR_ENTRY(N_("Cannot obtain resumption parameters while handshake is incomplete."), + GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE), {NULL, NULL, 0} }; diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index a2932e740c..5778d4a2ec 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -2760,6 +2760,7 @@ int gnutls_fips140_mode_enabled(void); #define GNUTLS_E_NEED_FALLBACK -405 #define GNUTLS_E_SESSION_USER_ID_CHANGED -406 #define GNUTLS_E_HANDSHAKE_DURING_FALSE_START -407 +#define GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE -408 #define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 diff --git a/lib/session_pack.c b/lib/session_pack.c index 96b8efe0c1..5833eb0eaf 100644 --- a/lib/session_pack.c +++ b/lib/session_pack.c @@ -728,7 +728,7 @@ pack_security_parameters(gnutls_session_t session, gnutls_buffer_st * ps) if (session->security_parameters.epoch_read != session->security_parameters.epoch_write) { gnutls_assert(); - return GNUTLS_E_INVALID_REQUEST; + return GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE; } ret = _gnutls_epoch_get(session, EPOCH_READ_CURRENT, ¶ms); diff --git a/tests/resume-with-false-start.c b/tests/resume-with-false-start.c index 305fbfdd33..6c5eecd8d6 100644 --- a/tests/resume-with-false-start.c +++ b/tests/resume-with-false-start.c @@ -121,7 +121,7 @@ void doit(void) /* try obtaining the resumption data. This should fail because * the handshake is not yet complete (due to false start) */ ret = gnutls_session_get_data2(client, &data); - if (ret != GNUTLS_E_INVALID_REQUEST) { + if (ret != GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE) { fail("unexpected error: %s\n", gnutls_strerror(ret)); } |