0d8d9c64f656d62707b0b419f7f35a10e6038562
4 * @brief Tests to test the IKE_SA type ike_sa_t
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 #include "ike_sa_test.h"
26 #include <encoding/message.h>
27 #include <sa/ike_sa.h>
29 void test_ike_sa(tester_t
*tester
)
32 ike_sa_id_t
*ike_sa_id
;
33 u_int64_t initiator
, responder
;
40 /* create a ike_sa_id object for the new IKE_SA */
41 ike_sa_id
= ike_sa_id_create(initiator
, responder
, is_initiator
);
43 /* empty message and configuration objects are created */
46 /* test every ike_sa function */
47 ike_sa
= ike_sa_create(ike_sa_id
);
49 /* ike_sa->initialize_connection(ike_sa, NULL);
51 tester->assert_true(tester,(ike_sa != NULL), "ike_sa pointer check");
53 tester
->assert_true(tester
,(ike_sa
->destroy(ike_sa
) == SUCCESS
), "destroy call check");
55 ike_sa_id
->destroy(ike_sa_id
);