aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-11-30 17:38:49 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-11-30 17:38:49 +0100
commitcbdcca7fd7b74676766272394d8ad6c6b65f8155 (patch)
treebfd4781fbc717c26d13b22c82c7fcce547d6542e
parentf4e5acef3afdaa54f636f62516588c2a0a057fd1 (diff)
downloadstrongswan-cbdcca7fd7b74676766272394d8ad6c6b65f8155.tar.bz2
strongswan-cbdcca7fd7b74676766272394d8ad6c6b65f8155.tar.xz
renamed algorithm to proposal
-rw-r--r--src/libcharon/plugins/sql/mysql.sql18
-rw-r--r--src/libcharon/plugins/sql/sql_config.c21
-rw-r--r--src/libcharon/plugins/sql/sqlite.sql18
-rw-r--r--testing/hosts/default/etc/ipsec.d/tables.sql18
-rw-r--r--testing/tests/sql/net2net-route-pem/hosts/moon/etc/ipsec.d/data.sql22
-rw-r--r--testing/tests/sql/net2net-route-pem/hosts/sun/etc/ipsec.d/data.sql22
-rw-r--r--testing/tests/sql/net2net-start-pem/hosts/moon/etc/ipsec.d/data.sql42
-rw-r--r--testing/tests/sql/net2net-start-pem/hosts/sun/etc/ipsec.d/data.sql38
8 files changed, 100 insertions, 99 deletions
diff --git a/src/libcharon/plugins/sql/mysql.sql b/src/libcharon/plugins/sql/mysql.sql
index 3262015a1..668d9d0b1 100644
--- a/src/libcharon/plugins/sql/mysql.sql
+++ b/src/libcharon/plugins/sql/mysql.sql
@@ -38,18 +38,18 @@ CREATE TABLE `child_config_traffic_selector` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-DROP TABLE IF EXISTS `algorithms`;
-CREATE TABLE `algorithms` (
+DROP TABLE IF EXISTS `proposals`;
+CREATE TABLE `proposals` (
`id` int(10) unsigned NOT NULL auto_increment,
- `algorithm` varchar(128) NOT NULL
+ `proposal` varchar(128) NOT NULL
);
-DROP TABLE IF EXISTS `child_config_algorithm`;
-CREATE TABLE `child_config_algorithm` (
+DROP TABLE IF EXISTS `child_config_proposal`;
+CREATE TABLE `child_config_proposal` (
`child_cfg` int(10) unsigned NOT NULL,
`prio` smallint(5) unsigned NOT NULL,
- `alg` int(10) unsigned NOT NULL
+ `prop` int(10) unsigned NOT NULL
);
@@ -64,11 +64,11 @@ CREATE TABLE `ike_configs` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-DROP TABLE IF EXISTS `ike_config_algorithm`;
-CREATE TABLE `ike_config_algorithm` (
+DROP TABLE IF EXISTS `ike_config_proposal`;
+CREATE TABLE `ike_config_proposal` (
`ike_cfg` int(10) unsigned NOT NULL,
`prio` smallint(5) unsigned NOT NULL,
- `alg` int(10) unsigned NOT NULL
+ `prop` int(10) unsigned NOT NULL
);
diff --git a/src/libcharon/plugins/sql/sql_config.c b/src/libcharon/plugins/sql/sql_config.c
index bc562c2bf..8b9fdce42 100644
--- a/src/libcharon/plugins/sql/sql_config.c
+++ b/src/libcharon/plugins/sql/sql_config.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006-2008 Martin Willi
+ * Copyright (C) 2010 Andreas Steffen
* Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -126,19 +127,19 @@ static void add_esp_proposals(private_sql_config_t *this,
{
enumerator_t *e;
proposal_t *proposal;
- char *alg;
+ char *prop;
bool use_default = TRUE;
e = this->db->query(this->db,
- "SELECT algorithm "
- "FROM algorithms JOIN child_config_algorithm ON id = alg "
+ "SELECT proposal "
+ "FROM proposals JOIN child_config_proposal ON id = prop "
"WHERE child_cfg = ? ORDER BY prio",
DB_INT, id, DB_TEXT);
if (e)
{
- while (e->enumerate(e, &alg))
+ while (e->enumerate(e, &prop))
{
- proposal = proposal_create_from_string(PROTO_ESP, alg);
+ proposal = proposal_create_from_string(PROTO_ESP, prop);
child->add_proposal(child, proposal);
use_default = FALSE;
}
@@ -209,19 +210,19 @@ static void add_ike_proposals(private_sql_config_t *this,
{
enumerator_t *e;
proposal_t *proposal;
- char *alg;
+ char *prop;
bool use_default = TRUE;
e = this->db->query(this->db,
- "SELECT algorithm "
- "FROM algorithms JOIN ike_config_algorithm ON id = alg "
+ "SELECT proposal "
+ "FROM proposals JOIN ike_config_proposal ON id = prop "
"WHERE ike_cfg = ? ORDER BY prio",
DB_INT, id, DB_TEXT);
if (e)
{
- while (e->enumerate(e, &alg))
+ while (e->enumerate(e, &prop))
{
- proposal = proposal_create_from_string(PROTO_IKE, alg);
+ proposal = proposal_create_from_string(PROTO_IKE, prop);
ike_cfg->add_proposal(ike_cfg, proposal);
use_default = FALSE;
}
diff --git a/src/libcharon/plugins/sql/sqlite.sql b/src/libcharon/plugins/sql/sqlite.sql
index 603ecaeb7..a8c7a53d9 100644
--- a/src/libcharon/plugins/sql/sqlite.sql
+++ b/src/libcharon/plugins/sql/sqlite.sql
@@ -41,18 +41,18 @@ CREATE INDEX child_config_traffic_selector_all ON child_config_traffic_selector
child_cfg, traffic_selector
);
-DROP TABLE IF EXISTS algorithms;
-CREATE TABLE algorithms (
+DROP TABLE IF EXISTS proposals;
+CREATE TABLE proposals (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
- algorithm TEXT NOT NULL
+ proposal TEXT NOT NULL
);
-DROP TABLE IF EXISTS child_config_algorithm;
-CREATE TABLE child_config_algorithm (
+DROP TABLE IF EXISTS child_config_proposal;
+CREATE TABLE child_config_proposal (
child_cfg INTEGER NOT NULL,
prio INTEGER NOT NULL,
- alg INTEGER NOT NULL
+ prop INTEGER NOT NULL
);
@@ -66,11 +66,11 @@ CREATE TABLE ike_configs (
);
-DROP TABLE IF EXISTS ike_config_algorithm;
-CREATE TABLE ike_config_algorithm (
+DROP TABLE IF EXISTS ike_config_proposal;
+CREATE TABLE ike_config_proposal (
ike_cfg INTEGER NOT NULL,
prio INTEGER NOT NULL,
- alg INTEGER NOT NULL
+ prop INTEGER NOT NULL
);
diff --git a/testing/hosts/default/etc/ipsec.d/tables.sql b/testing/hosts/default/etc/ipsec.d/tables.sql
index 1ac7f056c..3a777da1a 100644
--- a/testing/hosts/default/etc/ipsec.d/tables.sql
+++ b/testing/hosts/default/etc/ipsec.d/tables.sql
@@ -39,17 +39,17 @@ CREATE INDEX child_config_traffic_selector_all ON child_config_traffic_selector
child_cfg, traffic_selector
);
-DROP TABLE IF EXISTS algorithms;
-CREATE TABLE algorithms (
+DROP TABLE IF EXISTS proposals;
+CREATE TABLE proposals (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
- algorithm TEXT NOT NULL
+ proposal TEXT NOT NULL
);
-DROP TABLE IF EXISTS child_config_algorithm;
-CREATE TABLE child_config_algorithm (
+DROP TABLE IF EXISTS child_config_proposal;
+CREATE TABLE child_config_proposal (
child_cfg INTEGER NOT NULL,
prio INTEGER NOT NULL,
- alg INTEGER NOT NULL
+ prop INTEGER NOT NULL
);
DROP TABLE IF EXISTS ike_configs;
@@ -61,11 +61,11 @@ CREATE TABLE ike_configs (
remote TEXT NOT NULL
);
-DROP TABLE IF EXISTS ike_config_algorithm;
-CREATE TABLE ike_config_algorithm (
+DROP TABLE IF EXISTS ike_config_proposal;
+CREATE TABLE ike_config_proposal (
ike_cfg INTEGER NOT NULL,
prio INTEGER NOT NULL,
- alg INTEGER NOT NULL
+ prop INTEGER NOT NULL
);
DROP TABLE IF EXISTS peer_configs;
diff --git a/testing/tests/sql/net2net-route-pem/hosts/moon/etc/ipsec.d/data.sql b/testing/tests/sql/net2net-route-pem/hosts/moon/etc/ipsec.d/data.sql
index 0eabb3540..02bc828af 100644
--- a/testing/tests/sql/net2net-route-pem/hosts/moon/etc/ipsec.d/data.sql
+++ b/testing/tests/sql/net2net-route-pem/hosts/moon/etc/ipsec.d/data.sql
@@ -100,10 +100,10 @@ INSERT INTO private_key_identity (
1, 6
);
-/* Algorithms */
+/* Proposals */
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128-sha256-modp3072'
);
@@ -116,8 +116,8 @@ INSERT INTO ike_configs (
'PH_IP_MOON', 'PH_IP_SUN'
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 1, 1
);
@@ -164,20 +164,20 @@ INSERT INTO peer_config_child_config (
1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
1, 1, 1
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
2, 1, 1
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
3, 1, 1
);
diff --git a/testing/tests/sql/net2net-route-pem/hosts/sun/etc/ipsec.d/data.sql b/testing/tests/sql/net2net-route-pem/hosts/sun/etc/ipsec.d/data.sql
index 2a7b7423e..97c482e05 100644
--- a/testing/tests/sql/net2net-route-pem/hosts/sun/etc/ipsec.d/data.sql
+++ b/testing/tests/sql/net2net-route-pem/hosts/sun/etc/ipsec.d/data.sql
@@ -100,10 +100,10 @@ INSERT INTO private_key_identity (
1, 6
);
-/* Algorithms */
+/* Proposals */
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128-sha256-modp3072'
);
@@ -116,8 +116,8 @@ INSERT INTO ike_configs (
'PH_IP_SUN', 'PH_IP_MOON'
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 1, 1
);
@@ -164,20 +164,20 @@ INSERT INTO peer_config_child_config (
1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
1, 1, 1
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
2, 1, 1
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
3, 1, 1
);
diff --git a/testing/tests/sql/net2net-start-pem/hosts/moon/etc/ipsec.d/data.sql b/testing/tests/sql/net2net-start-pem/hosts/moon/etc/ipsec.d/data.sql
index 2ffe55c60..e828f8902 100644
--- a/testing/tests/sql/net2net-start-pem/hosts/moon/etc/ipsec.d/data.sql
+++ b/testing/tests/sql/net2net-start-pem/hosts/moon/etc/ipsec.d/data.sql
@@ -100,28 +100,28 @@ INSERT INTO private_key_identity (
1, 6
);
-/* Algorithms */
+/* Proposals */
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128-sha256-modp2048'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes192-sha384-modp3072'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128gcm128'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes192gcm128'
);
@@ -134,14 +134,14 @@ INSERT INTO ike_configs (
'PH_IP_MOON', 'PH_IP_SUN'
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 1, 1
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 2, 2
);
@@ -188,26 +188,26 @@ INSERT INTO peer_config_child_config (
1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
1, 1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
2, 1, 4
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
3, 1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
3, 2, 4
);
diff --git a/testing/tests/sql/net2net-start-pem/hosts/sun/etc/ipsec.d/data.sql b/testing/tests/sql/net2net-start-pem/hosts/sun/etc/ipsec.d/data.sql
index e07f7b7b0..c5676b749 100644
--- a/testing/tests/sql/net2net-start-pem/hosts/sun/etc/ipsec.d/data.sql
+++ b/testing/tests/sql/net2net-start-pem/hosts/sun/etc/ipsec.d/data.sql
@@ -100,28 +100,28 @@ INSERT INTO private_key_identity (
1, 6
);
-/* Algorithms */
+/* Proposals */
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128-sha256-modp2048'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes192-sha384-modp3072'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes128gcm128'
);
-INSERT INTO algorithms (
- algorithm
+INSERT INTO proposals (
+ proposal
) VALUES (
'aes192gcm128'
);
@@ -134,14 +134,14 @@ INSERT INTO ike_configs (
'PH_IP_SUN', 'PH_IP_MOON'
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 1, 1
);
-INSERT INTO ike_config_algorithm (
- ike_cfg, prio, alg
+INSERT INTO ike_config_proposal (
+ ike_cfg, prio, prop
) VALUES (
1, 2, 2
);
@@ -188,20 +188,20 @@ INSERT INTO peer_config_child_config (
1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
1, 1, 3
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
2, 1, 4
);
-INSERT INTO child_config_algorithm (
- child_cfg, prio, alg
+INSERT INTO child_config_proposal (
+ child_cfg, prio, prop
) VALUES (
3, 1, 4
);