diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/hosts/default/etc/pts/data.sql | 1192 | ||||
-rw-r--r-- | testing/hosts/default/etc/pts/tables.sql | 256 | ||||
-rw-r--r-- | testing/tests/tnc/tnccs-11-radius-pts/pretest.dat | 2 | ||||
-rw-r--r-- | testing/tests/tnc/tnccs-20-os/pretest.dat | 6 | ||||
-rw-r--r-- | testing/tests/tnc/tnccs-20-pt-tls/pretest.dat | 2 | ||||
-rw-r--r-- | testing/tests/tnc/tnccs-20-pts/pretest.dat | 6 |
6 files changed, 8 insertions, 1456 deletions
diff --git a/testing/hosts/default/etc/pts/data.sql b/testing/hosts/default/etc/pts/data.sql deleted file mode 100644 index 9d938b9b8..000000000 --- a/testing/hosts/default/etc/pts/data.sql +++ /dev/null @@ -1,1192 +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' -); - -INSERT INTO products ( /* 29 */ - name -) VALUES ( - 'Android 4.1.2' -); - -INSERT INTO products ( /* 30 */ - name -) VALUES ( - 'Android 4.2.2' -); - -INSERT INTO products ( /* 31 */ - name -) VALUES ( - 'Android 4.3.1' -); - -INSERT INTO products ( /* 32 */ - name -) VALUES ( - 'Android 4.4' -); - -INSERT INTO products ( /* 33 */ - name -) VALUES ( - 'Android 4.4.1' -); - -INSERT INTO products ( /* 34 */ - name -) VALUES ( - 'Android 4.4.2' -); - -/* 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 -); - -INSERT INTO groups ( /* 11 */ - name -) VALUES ( - 'TPM BIOS' -); - -INSERT INTO groups ( /* 12 */ - name -) VALUES ( - 'TPM IMA' -); - -INSERT INTO groups ( /* 13 */ - name -) VALUES ( - 'TPM BIOS/IMA' -); - -/* 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 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 29 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 30 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 31 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 32 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 33 -); - -INSERT INTO groups_product_defaults ( - group_id, product_id -) VALUES ( - 3, 34 -); - -/* 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 -); - -INSERT INTO policies ( /* 19 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 16, 'TPM BIOS Measurements', 'B', 2, 2 -); - -INSERT INTO policies ( /* 20 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 16, 'TPM IMA Measurements', 'I', 2, 2 -); - -INSERT INTO policies ( /* 21 */ - type, name, argument, rec_fail, rec_noresult -) VALUES ( - 16, 'TPM BIOS/IMA Measurements', 'BI', 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 -); - -INSERT INTO enforcements ( /* 15 */ - policy, group_id, max_age -) VALUES ( - 19, 11, 60 -); - -INSERT INTO enforcements ( /* 16 */ - policy, group_id, max_age -) VALUES ( - 20, 12, 60 -); - -INSERT INTO enforcements ( /* 17 */ - policy, group_id, max_age -) VALUES ( - 21, 13, 60 -); - -/* 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' -); - -INSERT INTO tags ( - regid, unique_sw_id -) VALUES ( - 10, 'strongSwan-5-1-2' -); - 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 -); - diff --git a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat index a991d05ea..7541a2adb 100644 --- a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat +++ b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat @@ -5,7 +5,7 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id alice::ln -s /etc/freeradius/sites-available/inner-tunnel-second /etc/freeradius/sites-enabled/inner-tunnel-second alice::cat /etc/freeradius/sites-enabled/inner-tunnel-second -alice::cd /etc/pts; cat tables.sql data.sql data1.sql | sqlite3 config.db +alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties radiusd alice::cat /etc/tnc_config carol::cat /etc/tnc_config diff --git a/testing/tests/tnc/tnccs-20-os/pretest.dat b/testing/tests/tnc/tnccs-20-os/pretest.dat index e1434e481..0ac88dd8d 100644 --- a/testing/tests/tnc/tnccs-20-os/pretest.dat +++ b/testing/tests/tnc/tnccs-20-os/pretest.dat @@ -4,13 +4,13 @@ dave::iptables-restore < /etc/iptables.rules carol::echo 0 > /proc/sys/net/ipv4/ip_forward dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id moon::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql -moon::cd /etc/pts; cat tables.sql data.sql data1.sql | sqlite3 config.db +moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db moon::cat /etc/tnc_config carol::cat /etc/tnc_config dave::cat /etc/tnc_config moon::ipsec start -carol::ipsec start -dave::ipsec start +carol::ipsec start +dave::ipsec start carol::sleep 1 carol::ipsec up home dave::ipsec up home diff --git a/testing/tests/tnc/tnccs-20-pt-tls/pretest.dat b/testing/tests/tnc/tnccs-20-pt-tls/pretest.dat index 2a53977c0..f7d86ec7f 100644 --- a/testing/tests/tnc/tnccs-20-pt-tls/pretest.dat +++ b/testing/tests/tnc/tnccs-20-pt-tls/pretest.dat @@ -7,7 +7,7 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id dave::cat /etc/tnc_config alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data.sql -alice::cd /etc/pts; cat tables.sql data.sql data1.sql | sqlite3 config.db +alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db alice::ipsec start winnetou::ip route add 10.1.0.0/16 via 192.168.0.1 carol::ip route add 10.1.0.0/16 via 192.168.0.1 diff --git a/testing/tests/tnc/tnccs-20-pts/pretest.dat b/testing/tests/tnc/tnccs-20-pts/pretest.dat index 794aef9fb..49ea0416e 100644 --- a/testing/tests/tnc/tnccs-20-pts/pretest.dat +++ b/testing/tests/tnc/tnccs-20-pts/pretest.dat @@ -3,13 +3,13 @@ carol::iptables-restore < /etc/iptables.rules dave::iptables-restore < /etc/iptables.rules carol::echo 0 > /proc/sys/net/ipv4/ip_forward dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id -moon::cd /etc/pts; cat tables.sql data.sql data1.sql | sqlite3 config.db +moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db moon::cat /etc/tnc_config carol::cat /etc/tnc_config dave::cat /etc/tnc_config moon::ipsec start -dave::ipsec start -carol::ipsec start +dave::ipsec start +carol::ipsec start dave::sleep 1 dave::ipsec up home carol::ipsec up home |