dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38604?usp=email )
Change subject: pySim-shell-test: improve global platform tests ......................................................................
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 --- M tests/pySim-shell_test/gp/test_est_scp02_csv.script M tests/pySim-shell_test/gp/test_est_scp02_direct.template M tests/pySim-shell_test/gp/test_est_scp03_csv.script M tests/pySim-shell_test/gp/test_est_scp03_direct.template 4 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/38604/1
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 d44cdce..5e07481 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 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 60bb9d6..39bca95 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 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 8c3f2be..2a0b76d 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 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 70ef0ae..20592df 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 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