case S_ACTIVE:
return "S_ACTIVE";
- case S_NORMAL_OP:
- return "S_NORMAL_OP";
-
case S_ERROR:
return "S_ERROR";
}
/* Are we timed out on receive? */
- if (now >= ks->must_negotiate)
+ if (now >= ks->must_negotiate && ks->state < S_ACTIVE)
{
- if (ks->state < S_ACTIVE)
- {
- msg(D_TLS_ERRORS,
- "TLS Error: TLS key negotiation failed to occur within %d seconds (check your network connectivity)",
- session->opt->handshake_window);
- goto error;
- }
- else /* assume that ks->state == S_ACTIVE */
- {
- dmsg(D_TLS_DEBUG_MED, "STATE S_NORMAL_OP");
- ks->state = S_NORMAL_OP;
- ks->must_negotiate = 0;
- }
+ msg(D_TLS_ERRORS,
+ "TLS Error: TLS key negotiation failed to occur within %d seconds (check your network connectivity)",
+ session->opt->handshake_window);
+ goto error;
}
/* Wait for Initial Handshake ACK */
}
state_change = true;
ks->state = S_ACTIVE;
+ /* Cancel negotiation timeout */
+ ks->must_negotiate = 0;
INCR_SUCCESS;
/* Set outgoing address for data channel packets */
* material.
* -# \c S_GOT_KEY, have received remote part of \c key_source2 random
* material.
- * -# \c S_ACTIVE, normal operation during remaining handshake window.
- * -# \c S_NORMAL_OP, normal operation.
+ * -# \c S_ACTIVE, normal operation
*
* Servers follow the same order, except for \c S_SENT_KEY and \c
* S_GOT_KEY being reversed, because the server first receives the
* immediately after negotiation has
* completed while still within the
* handshake window. */
-/* ready to exchange data channel packets */
-#define S_NORMAL_OP 7 /**< Normal operational \c key_state
- * state. */
+/* Note that earlier versions also had a S_OP_NORMAL state that was
+ * virtually identical with S_ACTIVE and the code still assumes everything
+ * >= S_ACTIVE to be fully operational */
/** @} name Control channel negotiation states */
/** @} addtogroup control_processor */