# HG changeset patch # User Sebastien Decugis # Date 1266567692 -32400 # Node ID e5bcc8c9322e7f7a5e323f3a03c5a20363c3c1ef # Parent 113eb3d50ad932904bc1ec1022a12bd3f5f8742d Add hostname verification diff -r 113eb3d50ad9 -r e5bcc8c9322e freeDiameter/p_cnx.c --- a/freeDiameter/p_cnx.c Thu Feb 18 20:10:24 2010 +0900 +++ b/freeDiameter/p_cnx.c Fri Feb 19 17:21:32 2010 +0900 @@ -250,6 +250,9 @@ pthread_cleanup_push((void *)fd_cnx_destroy, cnx); + /* Set the hostname in the connection, so that handshake verifies the remote identity */ + fd_cnx_sethostname(cnx,peer->p_hdr.info.pi_diamid); + /* Handshake if needed (secure port) */ if (nc->dotls) { CHECK_FCT_DO( fd_cnx_handshake(cnx, GNUTLS_CLIENT, peer->p_hdr.info.config.pic_priority, NULL),