if (prev_eap_ds && prev_eap_ds->response)
eaptls_prev = (eaptls_packet_t *)prev_eap_ds->response->type.data;
- /*
- * First output the flags (for debugging)
- */
- RDEBUG3("Peer sent flags %c%c%c",
- TLS_START(eaptls_packet->flags) ? 'S' : '-',
- TLS_MORE_FRAGMENTS(eaptls_packet->flags) ? 'M' : '-',
- TLS_LENGTH_INCLUDED(eaptls_packet->flags) ? 'L' : '-');
+ if (eaptls_packet) {
+ /*
+ * First output the flags (for debugging)
+ */
+ RDEBUG3("Peer sent flags %c%c%c",
+ TLS_START(eaptls_packet->flags) ? 'S' : '-',
+ TLS_MORE_FRAGMENTS(eaptls_packet->flags) ? 'M' : '-',
+ TLS_LENGTH_INCLUDED(eaptls_packet->flags) ? 'L' : '-');
+ }
/*
* check for ACK
SSL_set_ex_data(tls_session->ssl, FR_TLS_EX_INDEX_REQUEST, request);
- if (handler->certs) pairadd(&request->packet->vps,
- paircopy(request->packet, handler->certs));
+ if (handler->certs) fr_pair_add(&request->packet->vps,
+ fr_pair_list_copy(request->packet, handler->certs));
/*
* This case is when SSL generates Alert then we
status = eaptls_operation(status, handler);
if (status == FR_TLS_SUCCESS) {
#define MAX_SESSION_SIZE (256)
- size_t size;
VALUE_PAIR *vps;
char buffer[2 * MAX_SESSION_SIZE + 1];
+
/*
* Restore the cached VPs before processing the
* application data.
*/
- size = tls_session->ssl->session->session_id_length;
- if (size > MAX_SESSION_SIZE) size = MAX_SESSION_SIZE;
-
- fr_bin2hex(buffer, tls_session->ssl->session->session_id, size);
+ tls_session_id(tls_session->ssl_session, buffer, MAX_SESSION_SIZE);
- vps = SSL_SESSION_get_ex_data(tls_session->ssl->session, fr_tls_ex_index_vps);
+ vps = SSL_SESSION_get_ex_data(tls_session->ssl_session, fr_tls_ex_index_vps);
if (!vps) {
RWDEBUG("No information in cached session %s", buffer);
} else {
*/
if (!handler->certs) {
rdebug_pair(L_DBG_LVL_2, request, vp, "request:");
- pairadd(&request->packet->vps, paircopyvp(request->packet, vp));
+ fr_pair_add(&request->packet->vps, fr_pair_copy(request->packet, vp));
}
} else {
rdebug_pair(L_DBG_LVL_2, request, vp, "reply:");
- pairadd(&request->reply->vps, paircopyvp(request->reply, vp));
+ fr_pair_add(&request->reply->vps, fr_pair_copy(request->reply, vp));
}
}
REXDENT();