diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2014-03-11 20:48:48 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2014-03-11 20:48:48 +0100 |
commit | 15fb7904f4431a6e7c305fd08732458f7f885e7e (patch) | |
tree | c93b60ee813af70509f00f34e29ebec311762427 /testing/hosts | |
parent | 5313d2d78ca150515f7f5eb39801c100690b6b29 (diff) | |
download | vyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.tar.gz vyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.zip |
Imported Upstream version 5.1.2
Diffstat (limited to 'testing/hosts')
-rw-r--r-- | testing/hosts/default/etc/ipsec.d/tables.sql | 270 | ||||
-rw-r--r-- | testing/hosts/default/etc/pts/data.sql | 1060 | ||||
-rw-r--r-- | testing/hosts/default/etc/pts/tables.sql | 256 |
3 files changed, 0 insertions, 1586 deletions
diff --git a/testing/hosts/default/etc/ipsec.d/tables.sql b/testing/hosts/default/etc/ipsec.d/tables.sql deleted file mode 100644 index 2917fc3fc..000000000 --- a/testing/hosts/default/etc/ipsec.d/tables.sql +++ /dev/null @@ -1,270 +0,0 @@ -/* strongSwan SQLite database */ - -DROP TABLE IF EXISTS identities; -CREATE TABLE identities ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - data BLOB NOT NULL, - UNIQUE (type, data) -); - -DROP TABLE IF EXISTS child_configs; -CREATE TABLE child_configs ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - lifetime INTEGER NOT NULL DEFAULT '1200', - rekeytime INTEGER NOT NULL DEFAULT '1020', - jitter INTEGER NOT NULL DEFAULT '180', - updown TEXT DEFAULT NULL, - hostaccess INTEGER NOT NULL DEFAULT '0', - mode INTEGER NOT NULL DEFAULT '2', - start_action INTEGER NOT NULL DEFAULT '0', - dpd_action INTEGER NOT NULL DEFAULT '0', - close_action INTEGER NOT NULL DEFAULT '0', - ipcomp INTEGER NOT NULL DEFAULT '0', - reqid INTEGER NOT NULL DEFAULT '0' -); -DROP INDEX IF EXISTS child_configs_name; -CREATE INDEX child_configs_name ON child_configs ( - name -); - -DROP TABLE IF EXISTS child_config_traffic_selector; -CREATE TABLE child_config_traffic_selector ( - child_cfg INTEGER NOT NULL, - traffic_selector INTEGER NOT NULL, - kind INTEGER NOT NULL -); -DROP INDEX IF EXISTS child_config_traffic_selector; -CREATE INDEX child_config_traffic_selector_all ON child_config_traffic_selector ( - child_cfg, traffic_selector -); - -DROP TABLE IF EXISTS proposals; -CREATE TABLE proposals ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - proposal TEXT NOT NULL -); - -DROP TABLE IF EXISTS child_config_proposal; -CREATE TABLE child_config_proposal ( - child_cfg INTEGER NOT NULL, - prio INTEGER NOT NULL, - prop INTEGER NOT NULL -); - -DROP TABLE IF EXISTS ike_configs; -CREATE TABLE ike_configs ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - certreq INTEGER NOT NULL DEFAULT '1', - force_encap INTEGER NOT NULL DEFAULT '0', - local TEXT NOT NULL, - remote TEXT NOT NULL -); - -DROP TABLE IF EXISTS ike_config_proposal; -CREATE TABLE ike_config_proposal ( - ike_cfg INTEGER NOT NULL, - prio INTEGER NOT NULL, - prop INTEGER NOT NULL -); - -DROP TABLE IF EXISTS peer_configs; -CREATE TABLE peer_configs ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - ike_version INTEGER NOT NULL DEFAULT '2', - ike_cfg INTEGER NOT NULL, - local_id TEXT NOT NULL, - remote_id TEXT NOT NULL, - cert_policy INTEGER NOT NULL DEFAULT '1', - uniqueid INTEGER NOT NULL DEFAULT '0', - auth_method INTEGER NOT NULL DEFAULT '1', - eap_type INTEGER NOT NULL DEFAULT '0', - eap_vendor INTEGER NOT NULL DEFAULT '0', - keyingtries INTEGER NOT NULL DEFAULT '1', - rekeytime INTEGER NOT NULL DEFAULT '0', - reauthtime INTEGER NOT NULL DEFAULT '3600', - jitter INTEGER NOT NULL DEFAULT '180', - overtime INTEGER NOT NULL DEFAULT '300', - mobike INTEGER NOT NULL DEFAULT '1', - dpd_delay INTEGER NOT NULL DEFAULT '120', - virtual TEXT DEFAULT NULL, - pool TEXT DEFAULT NULL, - mediation INTEGER NOT NULL DEFAULT '0', - mediated_by INTEGER NOT NULL DEFAULT '0', - peer_id INTEGER NOT NULL DEFAULT '0' -); -DROP INDEX IF EXISTS peer_configs_name; -CREATE INDEX peer_configs_name ON peer_configs ( - name -); - -DROP TABLE IF EXISTS peer_config_child_config; -CREATE TABLE peer_config_child_config ( - peer_cfg INTEGER NOT NULL, - child_cfg INTEGER NOT NULL, - PRIMARY KEY (peer_cfg, child_cfg) -); - -DROP TABLE IF EXISTS traffic_selectors; -CREATE TABLE traffic_selectors ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL DEFAULT '7', - protocol INTEGER NOT NULL DEFAULT '0', - start_addr BLOB DEFAULT NULL, - end_addr BLOB DEFAULT NULL, - start_port INTEGER NOT NULL DEFAULT '0', - end_port INTEGER NOT NULL DEFAULT '65535' -); - -DROP TABLE IF EXISTS certificates; -CREATE TABLE certificates ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - keytype INTEGER NOT NULL, - data BLOB NOT NULL -); - -DROP TABLE IF EXISTS certificate_identity; -CREATE TABLE certificate_identity ( - certificate INTEGER NOT NULL, - identity INTEGER NOT NULL, - PRIMARY KEY (certificate, identity) -); - -DROP TABLE IF EXISTS private_keys; -CREATE TABLE private_keys ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - data BLOB NOT NULL -); - -DROP TABLE IF EXISTS private_key_identity; -CREATE TABLE private_key_identity ( - private_key INTEGER NOT NULL, - identity INTEGER NOT NULL, - PRIMARY KEY (private_key, identity) -); - -DROP TABLE IF EXISTS shared_secrets; -CREATE TABLE shared_secrets ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - data BLOB NOT NULL -); - -DROP TABLE IF EXISTS shared_secret_identity; -CREATE TABLE shared_secret_identity ( - shared_secret INTEGER NOT NULL, - identity INTEGER NOT NULL, - PRIMARY KEY (shared_secret, identity) -); - -DROP TABLE IF EXISTS certificate_authorities; -CREATE TABLE certificate_authorities ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - certificate INTEGER NOT NULL -); - -DROP TABLE IF EXISTS certificate_distribution_points; -CREATE TABLE certificate_distribution_points ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - ca INTEGER NOT NULL, - type INTEGER NOT NULL, - uri TEXT NOT NULL -); - -DROP TABLE IF EXISTS pools; -CREATE TABLE pools ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - start BLOB NOT NULL, - end BLOB NOT NULL, - timeout INTEGER NOT NULL -); -DROP INDEX IF EXISTS pools_name; -CREATE INDEX pools_name ON pools ( - name -); - -DROP TABLE IF EXISTS addresses; -CREATE TABLE addresses ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - pool INTEGER NOT NULL, - address BLOB NOT NULL, - identity INTEGER NOT NULL DEFAULT 0, - acquired INTEGER NOT NULL DEFAULT 0, - released INTEGER NOT NULL DEFAULT 1 -); -DROP INDEX IF EXISTS addresses_pool; -CREATE INDEX addresses_pool ON addresses ( - pool -); -DROP INDEX IF EXISTS addresses_address; -CREATE INDEX addresses_address ON addresses ( - address -); -DROP INDEX IF EXISTS addresses_identity; -CREATE INDEX addresses_identity ON addresses ( - identity -); - -DROP TABLE IF EXISTS leases; -CREATE TABLE leases ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - address INTEGER NOT NULL, - identity INTEGER NOT NULL, - acquired INTEGER NOT NULL, - released INTEGER NOT NULL -); - -DROP TABLE IF EXISTS attribute_pools; -CREATE TABLE attribute_pools ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL -); - -DROP TABLE IF EXISTS attributes; -CREATE TABLE attributes ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - identity INTEGER NOT NULL DEFAULT 0, - pool INTEGER NOT NULL DEFAULT 0, - type INTEGER NOT NULL, - value BLOB NOT NULL -); -DROP INDEX IF EXISTS attributes_identity; -CREATE INDEX attributes_identity ON attributes ( - identity -); -DROP INDEX IF EXISTS attributes_pool; -CREATE INDEX attributes_pool ON attributes ( - pool -); - -DROP TABLE IF EXISTS ike_sas; -CREATE TABLE ike_sas ( - local_spi BLOB NOT NULL PRIMARY KEY, - remote_spi BLOB NOT NULL, - id INTEGER NOT NULL, - initiator INTEGER NOT NULL, - local_id_type INTEGER NOT NULL, - local_id_data BLOB DEFAULT NULL, - remote_id_type INTEGER NOT NULL, - remote_id_data BLOB DEFAULT NULL, - host_family INTEGER NOT NULL, - local_host_data BLOB NOT NULL, - remote_host_data BLOB NOT NULL, - created INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP -); - -DROP TABLE IF EXISTS logs; -CREATE TABLE logs ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - local_spi BLOB NOT NULL, - signal INTEGER NOT NULL, - level INTEGER NOT NULL, - msg TEXT NOT NULL, - time INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP -); - diff --git a/testing/hosts/default/etc/pts/data.sql b/testing/hosts/default/etc/pts/data.sql deleted file mode 100644 index 241a99645..000000000 --- a/testing/hosts/default/etc/pts/data.sql +++ /dev/null @@ -1,1060 +0,0 @@ -/* Products */ - -INSERT INTO products ( /* 1 */ - name -) VALUES ( - 'Debian 6.0 i686' -); - -INSERT INTO products ( /* 2 */ - name -) VALUES ( - 'Debian 6.0 x86_64' -); - -INSERT INTO products ( /* 3 */ - name -) VALUES ( - 'Debian 7.0 i686' -); - -INSERT INTO products ( /* 4 */ - name -) VALUES ( - 'Debian 7.0 x86_64' -); - -INSERT INTO products ( /* 5 */ - name -) VALUES ( - 'Debian 8.0 i686' -); - -INSERT INTO products ( /* 6 */ - name -) VALUES ( - 'Debian 8.0 x86_64' -); - -INSERT INTO products ( /* 7 */ - name -) VALUES ( - 'Ubuntu 10.04 i686' -); - -INSERT INTO products ( /* 8 */ - name -) VALUES ( - 'Ubuntu 10.04 x86_64' -); - -INSERT INTO products ( /* 9 */ - name -) VALUES ( - 'Ubuntu 10.10 i686' -); - -INSERT INTO products ( /* 10 */ - name -) VALUES ( - 'Ubuntu 10.10 x86_64' -); - -INSERT INTO products ( /* 11 */ - name -) VALUES ( - 'Ubuntu 11.04 i686' -); - -INSERT INTO products ( /* 12 */ - name -) VALUES ( - 'Ubuntu 11.04 x86_64' -); - -INSERT INTO products ( /* 13 */ - name -) VALUES ( - 'Ubuntu 11.10 i686' -); - -INSERT INTO products ( /* 14 */ - name -) VALUES ( - 'Ubuntu 11.10 x86_64' -); - -INSERT INTO products ( /* 15 */ - name -) VALUES ( - 'Ubuntu 12.04 i686' -); - -INSERT INTO products ( /* 16 */ - name -) VALUES ( - 'Ubuntu 12.04 x86_64' -); - -INSERT INTO products ( /* 17 */ - name -) VALUES ( - 'Ubuntu 12.10 i686' -); - -INSERT INTO products ( /* 18 */ - name -) VALUES ( - 'Ubuntu 12.10 x86_64' -); - -INSERT INTO products ( /* 19 */ - name -) VALUES ( - 'Ubuntu 13.04 i686' -); - -INSERT INTO products ( /* 20 */ - name -) VALUES ( - 'Ubuntu 13.04 x86_64' -); - -INSERT INTO products ( /* 21 */ - name -) VALUES ( - 'Android 4.1.1' -); - -INSERT INTO products ( /* 22 */ - name -) VALUES ( - 'Android 4.2.1' -); - -INSERT INTO products ( /* 23 */ - name -) VALUES ( - 'Ubuntu 13.10 i686' -); - -INSERT INTO products ( /* 24 */ - name -) VALUES ( - 'Ubuntu 13.10 x86_64' -); - -INSERT INTO products ( /* 25 */ - name -) VALUES ( - 'Debian 7.1 i686' -); - -INSERT INTO products ( /* 26 */ - name -) VALUES ( - 'Debian 7.1 x86_64' -); - -INSERT INTO products ( /* 27 */ - name -) VALUES ( - 'Debian 7.2 i686' -); - -INSERT INTO products ( /* 28 */ - name -) VALUES ( - 'Debian 7.2 x86_64' -); - -/* Directories */ - -INSERT INTO directories ( /* 1 */ - path -) VALUES ( - '/bin' -); - -INSERT INTO directories ( /* 2 */ - path -) VALUES ( - '/etc' -); - -INSERT INTO directories ( /* 3 */ - path -) VALUES ( - '/lib' -); - -INSERT INTO directories ( /* 4 */ - path -) VALUES ( - '/lib/i386-linux-gnu' -); - -INSERT INTO directories ( /* 5 */ - path -) VALUES ( - '/lib/x86_64-linux-gnu' -); - -INSERT INTO directories ( /* 6 */ - path -) VALUES ( - '/lib/xtables' -); - -INSERT INTO directories ( /* 7 */ - path -) VALUES ( - '/sbin' -); - -INSERT INTO directories ( /* 8 */ - path -) VALUES ( - '/usr/bin' -); - -INSERT INTO directories ( /* 9 */ - path -) VALUES ( - '/usr/lib' -); - -INSERT INTO directories ( /* 10 */ - path -) VALUES ( - '/usr/lib/i386-linux-gnu' -); - -INSERT INTO directories ( /* 11 */ - path -) VALUES ( - '/usr/lib/x86_64-linux-gnu' -); - -INSERT INTO directories ( /* 12 */ - path -) VALUES ( - '/usr/sbin' -); - -INSERT INTO directories ( /* 13 */ - path -) VALUES ( - '/system/bin' -); - -INSERT INTO directories ( /* 14 */ - path -) VALUES ( - '/system/lib' -); - -/* Files */ - -INSERT INTO files ( /* 1 */ - name, dir -) VALUES ( - 'libcrypto.so.1.0.0', 5 -); - -INSERT INTO files ( /* 2 */ - name, dir -) VALUES ( - 'libcrypto.so.1.0.0', 11 -); - -INSERT INTO files ( /* 3 */ - name, dir -) VALUES ( - 'libssl.so.1.0.0', 5 -); - -INSERT INTO files ( /* 4 */ - name, dir -) VALUES ( - 'libssl.so.1.0.0', 11 -); - -INSERT INTO files ( /* 5 */ - name, dir -) VALUES ( - 'openssl', 8 -); - -INSERT INTO files ( /* 6 */ - name, dir -) VALUES ( - 'tnc_config', 2 -); - -/* Algorithms */ - -INSERT INTO algorithms ( - id, name -) VALUES ( - 65536, 'SHA1-IMA' -); - -INSERT INTO algorithms ( - id, name -) VALUES ( - 32768, 'SHA1' -); - -INSERT INTO algorithms ( - id, name -) VALUES ( - 16384, 'SHA256' -); - -INSERT INTO algorithms ( - id, name -) VALUES ( - 8192, 'SHA384' -); - -/* File Hashes */ - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 2, 32768, X'6c6f8e12f6cbfba612e780374c4cdcd40f20968a' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 2, 16384, X'dbcecd19d59310183cf5c31ddee29e8d7bec64d3f9583aad074330a1b3024b07' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 2, 8192, X'197c5385e5853003188833d4f991136c1b0875fa416a60b1159f64e57e457b3184762c884a802a2bda194c058e3bd953' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 4, 32768, X'3ad204f99eb7262efab79cfca02628870ea76361' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 4, 16384, X'3a2170aad92fdd58b55e0e199822bc873cf587b2d1eb1ed7ed8dcea97ae86376' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 4, 8192, X'f778076baa876b5e4b502494a3db081fb09dd870dee6991d54104a74b7e009c58fe261db5ffd13c11e08ef0cefcfa59f' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 5, 32768, X'ecd9c7076cc0572724c7a67db7f19c2831e0445f' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 5, 16384, X'28f3ea5afd34444c8232ea75003131e294a0c9b847de300e4b205d38c1a41305' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 28, 5, 8192, X'51921a8b9322f2d3f06d55002ff40a79da67e70cb563b2a50977642d603dfac2ccbb68b3d32a8bb350769b75d6254208' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 1, 32768, X'd9309b9e45928239d7a7b18711e690792632cce4' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 1, 16384, X'dbfa1856d278d8707c4989b30dd065b4bcd309908f0f2e6e66ff2aa83ff93f59' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 1, 8192, X'fb8d027f03bb5ebb47741ed247eb9e174127b714d20229885feb37e0979aeb14a1b74020cded891d680441093625729c' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 3, 32768, X'3715f2f94016a91fab5bbc503f0f1d43c5a9fc2b' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 3, 16384, X'c03a5296b5decb87b01517f9927a8b2349dfb29ff9f5ba084f994c155ca5d4be' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 3, 8192, X'b8bc345f56115235cc6091f61e312ce43ea54a5b99e7295002ae7b415fd35e06ec4c731ab70ad00d784bb53a318a2fa0' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 5, 32768, X'e59602f4edf24c1b36199588886d06665d4adcd7' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 5, 16384, X'090e1b77bda7fe665e498c6b5e09dbb7ddc5cfe57f213de48f4fb6736484f500' -); - -INSERT INTO file_hashes ( - product, file, algo, hash -) VALUES ( - 18, 5, 8192, X'7cbdb4612a13443dba910ecdef5161f2213e52c9b4a2eef14bcee5d287e9df931cd022e9e9715518ad9c9b6e3384a668' -); - -/* Packages */ - -INSERT INTO packages ( /* 1 */ - name -) VALUES ( - 'libssl-dev' -); - -INSERT INTO packages ( /* 2 */ - name -) VALUES ( - 'libssl1.0.0' -); - -INSERT INTO packages ( /* 3 */ - name -) VALUES ( - 'libssl1.0.0-dbg' -); - -INSERT INTO packages ( /* 4 */ - name -) VALUES ( - 'openssl' -); - -/* Versions */ - -INSERT INTO versions ( - package, product, release, time -) VALUES ( - 1, 28, '1.0.1e-2', 1366531494 -); - -INSERT INTO versions ( - package, product, release, time -) VALUES ( - 2, 28, '1.0.1e-2', 1366531494 -); - -INSERT INTO versions ( - package, product, release, time -) VALUES ( - 3, 28, '1.0.1e-2', 1366531494 -); - -INSERT INTO versions ( - package, product, release, time -) VALUES ( - 4, 28, '1.0.1e-2', 1366531494 -); - -/* Components */ - -INSERT INTO components ( - vendor_id, name, qualifier -) VALUES ( - 36906, 1, 33 /* ITA TGRUB */ -); - -INSERT INTO components ( - vendor_id, name, qualifier -) VALUES ( - 36906, 2, 33 /* ITA TBOOT */ -); - -INSERT INTO components ( - vendor_id, name, qualifier -) VALUES ( - 36906, 3, 33 /* ITA IMA - Trusted Platform */ -); - -INSERT INTO components ( - vendor_id, name, qualifier -) VALUES ( - 36906, 3, 34 /* ITA IMA - Operating System */ -); - -/* Groups */ - -INSERT INTO groups ( /* 1 */ - name -) VALUES ( - 'Default' -); - -INSERT INTO groups ( /* 2 */ - name, parent -) VALUES ( - 'Linux', 1 -); - -INSERT INTO groups ( /* 3 */ - name, parent -) VALUES ( - 'Android', 1 -); - -INSERT INTO groups ( /* 4 */ - name, parent -) VALUES ( - 'Debian i686', 2 -); - -INSERT INTO groups ( /* 5 */ - name, parent -) VALUES ( - 'Debian x86_64', 2 -); - -INSERT INTO groups ( /* 6 */ - name, parent -) VALUES ( - 'Ubuntu i686', 2 -); - -INSERT INTO groups ( /* 7 */ - name, parent -) VALUES ( - 'Ubuntu x86_64', 2 -); - -INSERT INTO groups ( /* 8 */ - name -) VALUES ( - 'Reference' -); - -INSERT INTO groups ( /* 9 */ - name, parent -) VALUES ( - 'Ref. Android', 8 -); - -INSERT INTO groups ( /* 10 */ - name, parent -) VALUES ( - 'Ref. Linux', 8 -); - -/* Default Product Groups */ - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 4, 1 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 4, 3 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 4, 5 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 4, 25 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 4, 27 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 5, 2 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 5, 4 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 5, 6 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 5, 26 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 5, 28 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 9 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 11 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 13 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 15 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 17 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 19 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 6, 23 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 8 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 10 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 12 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 14 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 16 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 18 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 20 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 7, 24 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 21 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 22 -); - -/* Policies */ - -INSERT INTO policies ( /* 1 */ - type, name, rec_fail, rec_noresult -) VALUES ( - 1, 'Installed Packages', 2, 2 -); - -INSERT INTO policies ( /* 2 */ - type, name, rec_fail, rec_noresult -) VALUES ( - 2, 'Unknown Source', 2, 2 -); - -INSERT INTO policies ( /* 3 */ - type, name, rec_fail, rec_noresult -) VALUES ( - 3, 'IP Forwarding Enabled', 1, 1 -); - -INSERT INTO policies ( /* 4 */ - type, name, rec_fail, rec_noresult -) VALUES ( - 4, 'Default Factory Password Enabled', 1, 1 -); - -INSERT INTO policies ( /* 5 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 6, 'Measure /lib/x86_64-linux-gnu/libcrypto.so.1.0.0', 1, 2, 2 -); - -INSERT INTO policies ( /* 6 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 6, 'Measure /lib/x86_64-linux-gnu/libssl.so.1.0.0', 3, 2, 2 -); - -INSERT INTO policies ( /* 7 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 6, 'Measure /usr/bin/openssl', 5, 2, 2 -); - -INSERT INTO policies ( /* 8 */ - type, name, rec_fail, rec_noresult -) VALUES ( - 11, 'No Open TCP Ports', 1, 1 -); - -INSERT INTO policies ( /* 9 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 13, 'Open UDP Ports', '500 4500 10000-65000', 1, 1 -); - -INSERT INTO policies ( /* 10 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 7, 'Metadata of /etc/tnc_config', 6, 0, 0 -); - -INSERT INTO policies ( /* 11 */ - type, name, dir, rec_fail, rec_noresult -) VALUES ( - 8, 'Get /bin', 1, 0, 0 -); - -INSERT INTO policies ( /* 12 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 6, 'Measure /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0', 2, 2, 2 -); - -INSERT INTO policies ( /* 13 */ - type, name, file, rec_fail, rec_noresult -) VALUES ( - 6, 'Measure /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0', 4, 2, 2 -); - -INSERT INTO policies ( /* 14 */ - type, name, dir, rec_fail, rec_noresult -) VALUES ( - 8, 'Get /system/bin', 13, 0, 0 -); - -INSERT INTO policies ( /* 15 */ - type, name, dir, rec_fail, rec_noresult -) VALUES ( - 8, 'Get /system/lib', 14, 0, 0 -); - -INSERT INTO policies ( /* 16 */ - type, name, dir, rec_fail, rec_noresult -) VALUES ( - 9, 'Measure /bin', 1, 2, 2 -); - -INSERT INTO policies ( /* 17 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 15, 'SWID Tag IDs', 'R', 2, 2 -); - -INSERT INTO policies ( /* 18 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 15, 'SWID Tags', '', 2, 2 -); - -/* Enforcements */ - -INSERT INTO enforcements ( /* 1 */ - policy, group_id, max_age -) VALUES ( - 1, 1, 86400 -); - -INSERT INTO enforcements ( /* 2 */ - policy, group_id, max_age -) VALUES ( - 2, 3, 0 -); - -INSERT INTO enforcements ( /* 3 */ - policy, group_id, max_age -) VALUES ( - 3, 2, 0 -); - -INSERT INTO enforcements ( /* 4 */ - policy, group_id, max_age -) VALUES ( - 5, 7, 86400 -); - -INSERT INTO enforcements ( /* 5 */ - policy, group_id, max_age -) VALUES ( - 6, 7, 86400 -); - -INSERT INTO enforcements ( /* 6 */ - policy, group_id, max_age -) VALUES ( - 7, 2, 86400 -); - -INSERT INTO enforcements ( /* 7 */ - policy, group_id, max_age -) VALUES ( - 8, 1, 60 -); - -INSERT INTO enforcements ( /* 8 */ - policy, group_id, max_age -) VALUES ( - 9, 1, 60 -); - -INSERT INTO enforcements ( /* 9 */ - policy, group_id, max_age -) VALUES ( - 10, 2, 60 -); - -INSERT INTO enforcements ( /* 10 */ - policy, group_id, max_age -) VALUES ( - 11, 10, 86400 -); - -INSERT INTO enforcements ( /* 11 */ - policy, group_id, max_age -) VALUES ( - 12, 5, 86400 -); - -INSERT INTO enforcements ( /* 12 */ - policy, group_id, max_age -) VALUES ( - 13, 5, 86400 -); - -INSERT INTO enforcements ( /* 13 */ - policy, group_id, max_age -) VALUES ( - 14, 9, 0 -); - -INSERT INTO enforcements ( /* 14 */ - policy, group_id, max_age -) VALUES ( - 15, 9, 0 -); - -/* regids */ - -INSERT INTO regids ( /* 1 */ - name -) VALUES ( - 'regid.1986-12.com.adobe' -); - -INSERT INTO regids ( /* 2 */ - name -) VALUES ( - 'regid.1991-06.com.microsoft' -); - -INSERT INTO regids ( /* 3 */ - name -) VALUES ( - 'regid.2004-05.com.ubuntu' -); - -INSERT INTO regids ( /* 4 */ - name -) VALUES ( - 'regid.1995-04.org.apache' -); - -INSERT INTO regids ( /* 5 */ - name -) VALUES ( - 'regid.1999-03.org.debian' -); - -INSERT INTO regids ( /* 6 */ - name -) VALUES ( - 'regid.1994-04.org.isc' -); - -INSERT INTO regids ( /* 7 */ - name -) VALUES ( - 'regid.1998-12.org.openssl' -); - -INSERT INTO regids ( /* 8 */ - name -) VALUES ( - 'regid.1998-01.org.samba' -); - -INSERT INTO regids ( /* 9 */ - name -) VALUES ( - 'regid.2002-08.org.sqlite' -); - -INSERT INTO regids ( /* 10 */ - name -) VALUES ( - 'regid.2004-03.org.strongswan' -); - -/* Tags */ - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 2, 'Windows-8-Pro' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'apache-2-2-22-13' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'bind-9-8-4-dfsg' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'libsqlite-3-7-13-1' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'libssl-1-0-1e-2' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'libssl-dev-1-0-1e-2' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'libssl-doc-1-0-1e-2' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'openssl-1-0-1e-2' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'smbclient-3-6-6-6' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 5, 'sqlite-3-7-13-1' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 10, 'strongSwan-5-1-1' -); - diff --git a/testing/hosts/default/etc/pts/tables.sql b/testing/hosts/default/etc/pts/tables.sql deleted file mode 100644 index a0f3a4e8d..000000000 --- a/testing/hosts/default/etc/pts/tables.sql +++ /dev/null @@ -1,256 +0,0 @@ -/* IMV PTS SQLite database */ - -DROP TABLE IF EXISTS directories; -CREATE TABLE directories ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - path TEXT NOT NULL -); -DROP INDEX IF EXISTS directories_path; -CREATE INDEX directories_path ON directories ( - path -); - -DROP TABLE IF EXISTS files; -CREATE TABLE files ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - dir INTEGER DEFAULT 0 REFERENCES directories(id), - name TEXT NOT NULL -); -DROP INDEX IF EXISTS files_name; -CREATE INDEX files_name ON files ( - name -); - -DROP TABLE IF EXISTS products; -CREATE TABLE products ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL -); -DROP INDEX IF EXISTS products_name; -CREATE INDEX products_name ON products ( - name -); - -DROP TABLE IF EXISTS algorithms; -CREATE TABLE algorithms ( - id INTEGER PRIMARY KEY, - name VARCHAR(20) not NULL -); - -DROP TABLE IF EXISTS file_hashes; -CREATE TABLE file_hashes ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - file INTEGER NOT NULL REFERENCES files(id), - product INTEGER NOT NULL REFERENCES products(id), - device INTEGER DEFAULT 0, - key INTEGER DEFAULT 0 REFERENCES keys(id), - algo INTEGER NOT NULL REFERENCES algorithms(id), - hash BLOB NOT NULL -); - -DROP TABLE IF EXISTS keys; -CREATE TABLE keys ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - keyid BLOB NOT NULL, - owner TEXT NOT NULL -); -DROP INDEX IF EXISTS keys_keyid; -CREATE INDEX keys_keyid ON keys ( - keyid -); -DROP INDEX IF EXISTS keys_owner; -CREATE INDEX keys_owner ON keys ( - owner -); - -DROP TABLE IF EXISTS groups; -CREATE TABLE groups ( - id INTEGER NOT NULL PRIMARY KEY, - name VARCHAR(50) NOT NULL UNIQUE, - parent INTEGER -); - -DROP TABLE IF EXISTS groups_members; -CREATE TABLE groups_members ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - group_id INTEGER NOT NULL REFERENCES groups(id), - device_id INTEGER NOT NULL REFERENCES devices(id), - UNIQUE (group_id, device_id) -); - -DROP TABLE IF EXISTS groups_product_defaults; -CREATE TABLE groups_product_defaults ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - group_id INTEGER NOT NULL REFERENCES groups(id), - product_id INTEGER NOT NULL REFERENCES products(id), - UNIQUE (group_id, product_id) -); - -DROP TABLE IF EXISTS policies; -CREATE TABLE policies ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - name VARCHAR(100) NOT NULL UNIQUE, - argument TEXT DEFAULT '' NOT NULL, - rec_fail INTEGER NOT NULL, - rec_noresult INTEGER NOT NULL, - file INTEGER DEFAULT 0 REFERENCES files(id), - dir INTEGER DEFAULT 0 REFERENCES directories(id) -); - -DROP TABLE IF EXISTS enforcements; -CREATE TABLE enforcements ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - policy INTEGER NOT NULL REFERENCES policies(id), - group_id INTEGER NOT NULL REFERENCES groups(id), - rec_fail INTEGER, - rec_noresult INTEGER, - max_age INTEGER NOT NULL, - UNIQUE (policy, group_id) -); - -DROP TABLE IF EXISTS sessions; -CREATE TABLE sessions ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - time INTEGER NOT NULL, - connection INTEGER NOT NULL, - identity INTEGER DEFAULT 0 REFERENCES identities(id), - device INTEGER DEFAULT 0 REFERENCES devices(id), - product INTEGER DEFAULT 0 REFERENCES products(id), - rec INTEGER DEFAULT 3 -); - -DROP TABLE IF EXISTS workitems; -CREATE TABLE workitems ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - session INTEGER NOT NULL REFERENCES sessions(id), - enforcement INTEGER NOT NULL REFERENCES enforcements(id), - type INTEGER NOT NULL, - arg_str TEXT, - arg_int INTEGER DEFAULT 0, - rec_fail INTEGER NOT NULL, - rec_noresult INTEGER NOT NULL, - rec_final INTEGER, - result TEXT -); -DROP INDEX IF EXISTS workitems_session; -CREATE INDEX workitems_sessions ON workitems ( - session -); - -DROP TABLE IF EXISTS results; -CREATE TABLE results ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - session INTEGER NOT NULL REFERENCES measurements(id), - policy INTEGER NOT NULL REFERENCES policies(id), - rec INTEGER NOT NULL, - result TEXT NOT NULL -); -DROP INDEX IF EXISTS results_session; -CREATE INDEX results_session ON results ( - session -); - -DROP TABLE IF EXISTS components; -CREATE TABLE components ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - vendor_id INTEGER NOT NULL, - name INTEGER NOT NULL, - qualifier INTEGER DEFAULT 0 -); - - -DROP TABLE IF EXISTS key_component; -CREATE TABLE key_component ( - key INTEGER NOT NULL, - component INTEGER NOT NULL, - depth INTEGER DEFAULT 0, - seq_no INTEGER DEFAULT 0, - PRIMARY KEY (key, component) -); - - -DROP TABLE IF EXISTS component_hashes; -CREATE TABLE component_hashes ( - component INTEGER NOT NULL, - key INTEGER NOT NULL, - seq_no INTEGER NOT NULL, - pcr INTEGER NOT NULL, - algo INTEGER NOT NULL, - hash BLOB NOT NULL, - PRIMARY KEY(component, key, seq_no, algo) -); - -DROP TABLE IF EXISTS packages; -CREATE TABLE packages ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - blacklist INTEGER DEFAULT 0 -); -DROP INDEX IF EXISTS packages_name; -CREATE INDEX packages_name ON packages ( - name -); - -DROP TABLE IF EXISTS versions; -CREATE TABLE versions ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - package INTEGER NOT NULL REFERENCES packages(id), - product INTEGER NOT NULL REFERENCES products(id), - release TEXT NOT NULL, - security INTEGER DEFAULT 0, - blacklist INTEGER DEFAULT 0, - time INTEGER DEFAULT 0 -); -DROP INDEX IF EXISTS versions_release; -CREATE INDEX versions_release ON versions ( - release -); -DROP INDEX IF EXISTS versions_package_product; -CREATE INDEX versions_package_product ON versions ( - package, product -); - -DROP TABLE IF EXISTS devices; -CREATE TABLE devices ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - description TEXT DEFAULT '', - value TEXT NOT NULL, - product INTEGER REFERENCES products(id), - created INTEGER -); -DROP INDEX IF EXISTS devices_id; -CREATE INDEX devices_value ON devices ( - value -); - -DROP TABLE IF EXISTS identities; -CREATE TABLE identities ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - type INTEGER NOT NULL, - value BLOB NOT NULL, - UNIQUE (type, value) -); - -DROP TABLE IF EXISTS regids; -CREATE TABLE regids ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL -); -DROP INDEX IF EXISTS regids_name; -CREATE INDEX regids_name ON regids ( - name -); - -DROP TABLE IF EXISTS tags; -CREATE TABLE tags ( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - regid INTEGER NOT NULL REFERENCES regids(id), - unique_sw_id TEXT NOT NULL, - value TEXT -); -DROP INDEX IF EXISTS tags_name; -CREATE INDEX tags_unique_sw_id ON tags ( - unique_sw_id -); - |