Beispiel #1
0
/* Send our public DH value and a nonce to the responder.  */
int
ike_phase_1_initiator_send_KE_NONCE (struct message *msg)
{
    struct ipsec_exch *ie = msg->exchange->data;

    ie->g_x_len = dh_getlen (ie->group);

    /* XXX I want a better way to specify the nonce's size.  */
    return ike_phase_1_send_KE_NONCE (msg, 16);
}
Beispiel #2
0
/* Send our public DH value and a nonce to the initiator.  */
int
responder_send_KE_NONCE(struct message *msg)
{
	/* XXX Should we really just use the initiator's nonce size?  */
	if (ike_phase_1_send_KE_NONCE(msg, msg->exchange->nonce_i_len))
		return -1;

	/*
	 * Calculate DH values & key material in parallel with the message
	 * going on a roundtrip over the wire.
         */
	message_register_post_send(msg,
	    (void (*)(struct message *))ike_phase_1_post_exchange_KE_NONCE);

	return 0;
}