}
/* resumed by session_ticket extension */
- if (session->internals.resumed == RESUME_TRUE)
+ if (session->internals.resumed != RESUME_FALSE)
{
/* to indicate the client that the current session is resumed */
memcpy (session->internals.resumed_security_parameters.session_id,
if ((session->internals.resumed == RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_CLIENT)
- || (session->internals.resumed == RESUME_TRUE
+ || (session->internals.resumed != RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_SERVER))
{
/* if we are a client not resuming - or we are a server resuming */
goto cleanup;
}
- if ((session->internals.resumed == RESUME_TRUE
+ if ((session->internals.resumed != RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_CLIENT)
|| (session->internals.resumed == RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_SERVER))
int ret = 0;
/* send and recv the change cipher spec and finished messages */
- if ((session->internals.resumed == RESUME_TRUE
+ if ((session->internals.resumed != RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_CLIENT)
|| (session->internals.resumed == RESUME_FALSE
&& session->security_parameters.entity == GNUTLS_SERVER))
typedef enum
{ CIPHER_STREAM, CIPHER_BLOCK } cipher_type_t;
-#define RESUME_TRUE 0
-#define RESUME_FALSE -1
+#define RESUME_TRUE 1
+#define RESUME_FALSE 0
/* Record Protocol */
typedef enum content_type_t
* the last received message */
gnutls_buffer_st handshake_hash_buffer; /* used to keep the last received handshake
* message */
- int resumable:1; /* TRUE or FALSE - if we can resume that session */
+ unsigned int resumable:1; /* TRUE or FALSE - if we can resume that session */
handshake_state_t handshake_state; /* holds
* a number which indicates where
* the handshake procedure has been
struct gnutls_priority_st priorities;
/* resumed session */
- int resumed:1; /* RESUME_TRUE or FALSE - if we are resuming a session */
+ unsigned int resumed:1; /* RESUME_TRUE or FALSE - if we are resuming a session */
security_parameters_st resumed_security_parameters;
/* These buffers are used in the handshake