From 59593e0f28b7b10d667c87a6d6d7c5a515f97a69 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 1 Nov 2024 11:00:19 +0100 Subject: [PATCH] pySim-shell-test: improve global platform tests The tests that check the establishment of a secure channel currently only test security level 3. Also the get_data command after it only tests data reception from the card. Let's extend the test coverage and test the SCP establishment for security level 1 as well. Let's also add a get_status command to make sure sending data to the card also works (without exceptions). Related: OS#6367 Change-Id: Idff40b414a249e532df1bdce2a8deb9b0cb9718f --- tests/pySim-shell_test/gp/test_est_scp02_csv.script | 7 +++++++ tests/pySim-shell_test/gp/test_est_scp02_direct.template | 6 ++++++ tests/pySim-shell_test/gp/test_est_scp03_csv.script | 7 +++++++ tests/pySim-shell_test/gp/test_est_scp03_direct.template | 7 +++++++ 4 files changed, 27 insertions(+) diff --git a/tests/pySim-shell_test/gp/test_est_scp02_csv.script b/tests/pySim-shell_test/gp/test_est_scp02_csv.script index d44cdce6..5e074814 100644 --- a/tests/pySim-shell_test/gp/test_est_scp02_csv.script +++ b/tests/pySim-shell_test/gp/test_est_scp02_csv.script @@ -2,6 +2,13 @@ set debug true set echo true select ADF.ISD + establish_scp02 --key-provider-suffix 1 --key-ver 112 --security-level 3 get_data issuer_identification_number +get_status isd +release_scp + +establish_scp02 --key-provider-suffix 1 --key-ver 112 --security-level 1 +get_data issuer_identification_number +get_status isd release_scp diff --git a/tests/pySim-shell_test/gp/test_est_scp02_direct.template b/tests/pySim-shell_test/gp/test_est_scp02_direct.template index 60bb9d61..39bca95a 100644 --- a/tests/pySim-shell_test/gp/test_est_scp02_direct.template +++ b/tests/pySim-shell_test/gp/test_est_scp02_direct.template @@ -2,7 +2,13 @@ set debug true set echo true select ADF.ISD + establish_scp02 --key-dek $KEY_DEK --key-enc $KEY_ENC --key-mac $KEY_MAC --key-ver 112 --security-level 3 get_data issuer_identification_number +get_status isd release_scp +establish_scp02 --key-dek $KEY_DEK --key-enc $KEY_ENC --key-mac $KEY_MAC --key-ver 112 --security-level 1 +get_data issuer_identification_number +get_status isd +release_scp diff --git a/tests/pySim-shell_test/gp/test_est_scp03_csv.script b/tests/pySim-shell_test/gp/test_est_scp03_csv.script index 8c3f2beb..2a0b76d2 100644 --- a/tests/pySim-shell_test/gp/test_est_scp03_csv.script +++ b/tests/pySim-shell_test/gp/test_est_scp03_csv.script @@ -2,6 +2,13 @@ set debug true set echo true select ADF.ISD-R + establish_scp03 --key-provider-suffix 1 --key-ver 50 --security-level 3 get_data issuer_identification_number +get_status isd +release_scp + +establish_scp03 --key-provider-suffix 1 --key-ver 50 --security-level 1 +get_data issuer_identification_number +get_status isd release_scp diff --git a/tests/pySim-shell_test/gp/test_est_scp03_direct.template b/tests/pySim-shell_test/gp/test_est_scp03_direct.template index 70ef0ae9..20592df4 100644 --- a/tests/pySim-shell_test/gp/test_est_scp03_direct.template +++ b/tests/pySim-shell_test/gp/test_est_scp03_direct.template @@ -2,6 +2,13 @@ set debug true set echo true select ADF.ISD-R + establish_scp03 --key-dek $KEY_DEK --key-enc $KEY_ENC --key-mac $KEY_MAC --key-ver 50 --security-level 3 get_data issuer_identification_number +get_status isd +release_scp + +establish_scp03 --key-dek $KEY_DEK --key-enc $KEY_ENC --key-mac $KEY_MAC --key-ver 50 --security-level 3 +get_data issuer_identification_number +get_status isd release_scp