Mercurial > hg > freeDiameter
changeset 219:e5bcc8c9322e
Add hostname verification
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 19 Feb 2010 17:21:32 +0900 |
parents | 113eb3d50ad9 |
children | 5f2ce627db3c |
files | freeDiameter/p_cnx.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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),