Commit 0390e984 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix a small bug in peers validation process

parent e40d4a7c
......@@ -819,6 +819,11 @@ int fd_p_ce_process_receiver(struct fd_peer * peer)
}
}
/* Save the credentials if handshake already occurred */
if ( fd_cnx_getTLS(peer->p_cnxctx) ) {
CHECK_FCT( fd_cnx_getcred(peer->p_cnxctx, &peer->p_hdr.info.runtime.pir_cert_list, &peer->p_hdr.info.runtime.pir_cert_list_size) );
}
/* Validate the peer if needed */
if (peer->p_flags.pf_responder) {
int res = fd_peer_validate( peer );
......
......@@ -456,7 +456,7 @@ int fd_peer_handle_newCER( struct msg ** cer, struct cnxctx ** cnx )
/* First, check if the Origin-Host value */
if (!fd_os_is_valid_DiameterIdentity(avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len)) {
TRACE_DEBUG(INFO, "Received new CER with invalid \\0 in its Origin-Host");
TRACE_DEBUG(INFO, "Received new CER with invalid Origin-Host");
CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, cer, MSGFL_ANSW_ERROR ) );
CHECK_FCT( fd_msg_rescode_set(*cer, "ER_DIAMETER_INVALID_AVP_VALUE",
"Your Origin-Host contains invalid characters.", avp_oh, 1 ) );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment