- dead end implementation
This commit is contained in:
@@ -274,16 +274,17 @@ u_int8_t private_key_2[];
|
||||
*/
|
||||
static void load_default_config (private_configuration_manager_t *this)
|
||||
{
|
||||
init_config_t *init_config1, *init_config2, *init_config3, *init_config4;
|
||||
init_config_t *init_config1, *init_config2, *init_config3, *init_config4, *init_config5;
|
||||
ike_proposal_t proposals[4];
|
||||
child_proposal_t child_proposals[1];
|
||||
sa_config_t *sa_config1, *sa_config2, *sa_config3, *sa_config4;
|
||||
child_proposal_t *child_proposal;
|
||||
sa_config_t *sa_config1, *sa_config2, *sa_config3, *sa_config4, *sa_config5;
|
||||
traffic_selector_t *ts;
|
||||
|
||||
init_config1 = init_config_create("0.0.0.0","152.96.193.131",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config2 = init_config_create("0.0.0.0","152.96.193.130",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config1 = init_config_create("0.0.0.0","192.168.1.1",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config2 = init_config_create("0.0.0.0","192.168.1.2",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config3 = init_config_create("0.0.0.0","127.0.0.1",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config4 = init_config_create("0.0.0.0","127.0.0.1",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
init_config5 = init_config_create("0.0.0.0","192.168.1.2",IKEV2_UDP_PORT,IKEV2_UDP_PORT);
|
||||
ts = traffic_selector_create_from_string(1, TS_IPV4_ADDR_RANGE, "0.0.0.0", 0, "255.255.255.255", 65535);
|
||||
|
||||
|
||||
@@ -316,25 +317,27 @@ static void load_default_config (private_configuration_manager_t *this)
|
||||
init_config3->add_proposal(init_config3,1,proposals[0]);
|
||||
init_config4->add_proposal(init_config4,1,proposals[3]);
|
||||
init_config4->add_proposal(init_config4,1,proposals[2]);
|
||||
init_config5->add_proposal(init_config5,1,proposals[3]);
|
||||
init_config5->add_proposal(init_config5,1,proposals[2]);
|
||||
|
||||
sa_config1 = sa_config_create(ID_IPV4_ADDR, "152.96.193.130",
|
||||
ID_IPV4_ADDR, "152.96.193.131",
|
||||
sa_config1 = sa_config_create(ID_IPV4_ADDR, "192.168.1.2",
|
||||
ID_IPV4_ADDR, "192.168.1.1",
|
||||
SHARED_KEY_MESSAGE_INTEGRITY_CODE,
|
||||
30000);
|
||||
|
||||
sa_config1->add_traffic_selector_initiator(sa_config1,ts);
|
||||
sa_config1->add_traffic_selector_responder(sa_config1,ts);
|
||||
|
||||
sa_config2 = sa_config_create(ID_IPV4_ADDR, "152.96.193.131",
|
||||
ID_IPV4_ADDR, "152.96.193.130",
|
||||
sa_config2 = sa_config_create(ID_IPV4_ADDR, "192.168.1.1",
|
||||
ID_IPV4_ADDR, "192.168.1.2",
|
||||
SHARED_KEY_MESSAGE_INTEGRITY_CODE,
|
||||
30000);
|
||||
|
||||
sa_config2->add_traffic_selector_initiator(sa_config2,ts);
|
||||
sa_config2->add_traffic_selector_responder(sa_config2,ts);
|
||||
|
||||
sa_config3 = sa_config_create(ID_IPV4_ADDR, "127.0.0.1",
|
||||
ID_IPV4_ADDR, "127.0.0.1",
|
||||
sa_config3 = sa_config_create(ID_IPV4_ADDR, "192.168.1.1",
|
||||
ID_IPV4_ADDR, "192.168.1.2",
|
||||
SHARED_KEY_MESSAGE_INTEGRITY_CODE,
|
||||
30000);
|
||||
|
||||
@@ -349,46 +352,48 @@ static void load_default_config (private_configuration_manager_t *this)
|
||||
sa_config4->add_traffic_selector_initiator(sa_config4,ts);
|
||||
sa_config4->add_traffic_selector_responder(sa_config4,ts);
|
||||
|
||||
sa_config5 = sa_config_create(ID_IPV4_ADDR, "192.168.1.1",
|
||||
ID_IPV4_ADDR, "192.168.1.2",
|
||||
RSA_DIGITAL_SIGNATURE,
|
||||
30000);
|
||||
|
||||
sa_config5->add_traffic_selector_initiator(sa_config5,ts);
|
||||
sa_config5->add_traffic_selector_responder(sa_config5,ts);
|
||||
|
||||
ts->destroy(ts);
|
||||
|
||||
/* ah and esp prop */
|
||||
child_proposals[0].ah.is_set = FALSE;
|
||||
child_proposals[0].ah.integrity_algorithm = AUTH_HMAC_SHA1_96;
|
||||
child_proposals[0].ah.integrity_algorithm_key_size = 20;
|
||||
child_proposals[0].ah.diffie_hellman_group = MODP_1024_BIT;
|
||||
child_proposals[0].ah.extended_sequence_numbers = NO_EXT_SEQ_NUMBERS;
|
||||
child_proposal->add_algorithm(child_proposal, AH, INTEGRITY_ALGORITHM, AUTH_HMAC_SHA1_96, 20);
|
||||
child_proposal->add_algorithm(child_proposal, AH, DIFFIE_HELLMAN_GROUP, MODP_1024_BIT, 0);
|
||||
child_proposal->add_algorithm(child_proposal, AH, EXTENDED_SEQUENCE_NUMBERS, NO_EXT_SEQ_NUMBERS, 0);
|
||||
|
||||
child_proposals[0].esp.is_set = TRUE;
|
||||
child_proposals[0].esp.diffie_hellman_group = MODP_UNDEFINED;
|
||||
child_proposals[0].esp.encryption_algorithm = ENCR_AES_CBC;
|
||||
child_proposals[0].esp.encryption_algorithm_key_size = 16;
|
||||
child_proposals[0].esp.integrity_algorithm = AUTH_HMAC_SHA1_96;
|
||||
child_proposals[0].esp.integrity_algorithm_key_size = 20;
|
||||
child_proposals[0].esp.extended_sequence_numbers = NO_EXT_SEQ_NUMBERS;
|
||||
child_proposals[0].esp.spi[0] = 2;
|
||||
child_proposals[0].esp.spi[1] = 2;
|
||||
child_proposals[0].esp.spi[2] = 2;
|
||||
child_proposals[0].esp.spi[3] = 2;
|
||||
child_proposal->add_algorithm(child_proposal, ESP, ENCRYPTION_ALGORITHM, ENCR_AES_CBC, 16);
|
||||
child_proposal->add_algorithm(child_proposal, ESP, INTEGRITY_ALGORITHM, AUTH_HMAC_SHA1_96, 20);
|
||||
child_proposal->add_algorithm(child_proposal, ESP, DIFFIE_HELLMAN_GROUP, MODP_UNDEFINED, 0);
|
||||
child_proposal->add_algorithm(child_proposal, ESP, EXTENDED_SEQUENCE_NUMBERS, NO_EXT_SEQ_NUMBERS, 0);
|
||||
|
||||
sa_config1->add_proposal(sa_config1, &child_proposals[0]);
|
||||
sa_config2->add_proposal(sa_config2, &child_proposals[0]);
|
||||
sa_config3->add_proposal(sa_config3, &child_proposals[0]);
|
||||
sa_config1->add_proposal(sa_config1, child_proposal);
|
||||
sa_config2->add_proposal(sa_config2, child_proposal);
|
||||
sa_config3->add_proposal(sa_config3, child_proposal);
|
||||
sa_config5->add_proposal(sa_config5, child_proposal);
|
||||
|
||||
this->add_new_configuration(this,"pinflb31",init_config1,sa_config1);
|
||||
this->add_new_configuration(this,"pinflb30",init_config2,sa_config2);
|
||||
this->add_new_configuration(this,"jan",init_config1,sa_config1);
|
||||
this->add_new_configuration(this,"martin",init_config2,sa_config2);
|
||||
this->add_new_configuration(this,"localhost-shared",init_config3,sa_config3);
|
||||
this->add_new_configuration(this,"localhost-rsa",init_config3,sa_config4);
|
||||
this->add_new_configuration(this,"localhost-bad_dh_group",init_config4, sa_config3);
|
||||
this->add_new_configuration(this,"martin-bad_dh_group",init_config5, sa_config3);
|
||||
this->add_new_configuration(this,"martin-rsa",init_config2, sa_config5);
|
||||
|
||||
|
||||
this->add_new_preshared_secret(this,ID_IPV4_ADDR, "152.96.193.130","verschluesselt");
|
||||
this->add_new_preshared_secret(this,ID_IPV4_ADDR, "152.96.193.131","verschluesselt");
|
||||
this->add_new_preshared_secret(this,ID_IPV4_ADDR, "192.168.1.2","verschluesselt");
|
||||
this->add_new_preshared_secret(this,ID_IPV4_ADDR, "192.168.1.1","verschluesselt");
|
||||
this->add_new_preshared_secret(this,ID_IPV4_ADDR, "127.0.0.1","verschluesselt");
|
||||
|
||||
this->add_new_rsa_public_key(this,ID_IPV4_ADDR, "127.0.0.1", public_key_1, 256);
|
||||
this->add_new_rsa_public_key(this,ID_IPV4_ADDR, "152.96.193.131", public_key_2, 256);
|
||||
this->add_new_rsa_public_key(this,ID_IPV4_ADDR, "192.168.1.1", public_key_2, 256);
|
||||
this->add_new_rsa_private_key(this,ID_IPV4_ADDR, "127.0.0.1", private_key_1, 1024);
|
||||
this->add_new_rsa_private_key(this,ID_IPV4_ADDR, "152.96.193.131", private_key_2, 1024);
|
||||
this->add_new_rsa_private_key(this,ID_IPV4_ADDR, "192.168.1.1", private_key_2, 1024);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user