Mercurial > hg > freeDiameter
comparison libfdcore/p_ce.c @ 1181:22de21feec64
Preparing for DTLS support
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Wed, 05 Jun 2013 19:22:26 +0800 |
parents | d00b5914351e |
children | 56c36d1007b4 |
comparison
equal
deleted
inserted
replaced
1180:773498f59520 | 1181:22de21feec64 |
---|---|
783 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS is disabled and peer is not configured for IPsec", NULL); | 783 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS is disabled and peer is not configured for IPsec", NULL); |
784 goto cleanup; | 784 goto cleanup; |
785 | 785 |
786 } else { | 786 } else { |
787 fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); | 787 fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); |
788 CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_CLIENT, peer->p_hdr.info.config.pic_priority, NULL), | 788 CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_CLIENT, ALGO_HANDSHAKE_3436, peer->p_hdr.info.config.pic_priority, NULL), |
789 { | 789 { |
790 /* Handshake failed ... */ | 790 /* Handshake failed ... */ |
791 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); | 791 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); |
792 goto cleanup; | 792 goto cleanup; |
793 } ); | 793 } ); |
952 CHECK_FCT( fd_out_send(&msg, peer->p_cnxctx, peer, FD_CNX_ORDERED ) ); | 952 CHECK_FCT( fd_out_send(&msg, peer->p_cnxctx, peer, FD_CNX_ORDERED ) ); |
953 | 953 |
954 /* Handshake if needed */ | 954 /* Handshake if needed */ |
955 if (isi & PI_SEC_TLS_OLD) { | 955 if (isi & PI_SEC_TLS_OLD) { |
956 fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); | 956 fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); |
957 CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_SERVER, peer->p_hdr.info.config.pic_priority, NULL), | 957 CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, peer->p_hdr.info.config.pic_priority, NULL), |
958 { | 958 { |
959 /* Handshake failed ... */ | 959 /* Handshake failed ... */ |
960 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); | 960 fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); |
961 goto cleanup; | 961 goto cleanup; |
962 } ); | 962 } ); |