/* Receive our peer's public DH value and nonce. */ int ike_phase_1_recv_KE_NONCE (struct message *msg) { /* Copy out the initiator's DH public value. */ if (ipsec_save_g_x (msg)) { /* XXX How to log and notify peer? */ return -1; } /* Copy out the initiator's nonce. */ if (exchange_save_nonce (msg)) { /* XXX How to log and notify peer? */ return -1; } /* Copy out the initiator's cert requests. */ if (exchange_save_certreq (msg)) { /* XXX How to log and notify peer? */ return -1; } return 0; }
/* Receive our peer's public DH value and nonce. */ int ike_phase_1_recv_KE_NONCE(struct message *msg) { /* Copy out the initiator's DH public value. */ if (ipsec_save_g_x(msg)) { /* XXX How to log and notify peer? */ return -1; } /* Copy out the initiator's nonce. */ if (exchange_save_nonce(msg)) { /* XXX How to log and notify peer? */ return -1; } /* Copy out the initiator's cert requests. */ if (exchange_save_certreq(msg)) { /* XXX How to log and notify peer? */ return -1; } /* MainMode: Check for NAT-D payloads and contents. */ if (msg->exchange->type == ISAKMP_EXCH_ID_PROT && msg->exchange->flags & EXCHANGE_FLAG_NAT_T_CAP_PEER) (void)nat_t_exchange_check_nat_d(msg); return 0; }