dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41251?usp=email )
Change subject: pySim-shell: update help strings for chv command parameter --pin-nr
......................................................................
pySim-shell: update help strings for chv command parameter --pin-nr
The --pin-nr is a decimal parameter that specifies which PIN (or CHV)
to reference. The exact numbers are specified in ETSI TS 102.221,
Table 9.3.
Unfortunately the enumeration of the PIN numbers is not very intuitive.
At the moment the help suggests 1 to reference PIN1, and 2 to reference
PIN2. The value for PIN1 is correct, but for PIN2, the value should be
129.
Change-Id: I0b58c402d95cbc4fe690e6edb214829d463e9f2c
---
M pySim-shell.py
1 file changed, 10 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/41251/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 977666c..8513658 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -917,7 +917,8 @@
verify_chv_parser = argparse.ArgumentParser()
verify_chv_parser.add_argument(
- '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or custom value (decimal)')
+ '--pin-nr', type=int, default=1,
+ help='PIN Number, 1=PIN1, 129=PIN2 or custom value (decimal, see also ETSI TS 102.221, Table 9.3")')
verify_chv_parser.add_argument('PIN', nargs='?', type=is_decimal,
help='PIN code value. If none given, CSV file will be queried')
@@ -932,7 +933,8 @@
unblock_chv_parser = argparse.ArgumentParser()
unblock_chv_parser.add_argument(
- '--pin-nr', type=int, default=1, help='PUK Number, 1=PIN1, 2=PIN2 or custom value (decimal)')
+ '--pin-nr', type=int, default=1,
+ help='PUK Number, 1=PIN1, 129=PIN2 or custom value (decimal, see also ETSI TS 102.221, Table 9.3")')
unblock_chv_parser.add_argument('PUK', nargs='?', type=is_decimal,
help='PUK code value. If none given, CSV file will be queried')
unblock_chv_parser.add_argument('NEWPIN', nargs='?', type=is_decimal,
@@ -953,7 +955,8 @@
change_chv_parser.add_argument('PIN', nargs='?', type=is_decimal,
help='PIN code value. If none given, CSV file will be queried')
change_chv_parser.add_argument(
- '--pin-nr', type=int, default=1, help='PUK Number, 1=PIN1, 2=PIN2 or custom value (decimal)')
+ '--pin-nr', type=int, default=1,
+ help='PUK Number, 1=PIN1, 129=PIN2 or custom value (decimal, see also ETSI TS 102.221, Table 9.3")')
@cmd2.with_argparser(change_chv_parser)
def do_change_chv(self, opts):
@@ -966,7 +969,8 @@
disable_chv_parser = argparse.ArgumentParser()
disable_chv_parser.add_argument(
- '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or custom value (decimal)')
+ '--pin-nr', type=int, default=1,
+ help='PIN Number, 1=PIN1, 129=PIN2 or custom value (decimal, see also ETSI TS 102.221, Table 9.3")')
disable_chv_parser.add_argument('PIN', nargs='?', type=is_decimal,
help='PIN code value. If none given, CSV file will be queried')
@@ -979,7 +983,8 @@
enable_chv_parser = argparse.ArgumentParser()
enable_chv_parser.add_argument(
- '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or custom value (decimal)')
+ '--pin-nr', type=int, default=1,
+ help='PIN Number, 1=PIN1, 129=PIN2 or custom value (decimal, see also ETSI TS 102.221, Table 9.3")')
enable_chv_parser.add_argument('PIN', nargs='?', type=is_decimal,
help='PIN code value. If none given, CSV file will be queried')
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41251?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0b58c402d95cbc4fe690e6edb214829d463e9f2c
Gerrit-Change-Number: 41251
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41250?usp=email )
Change subject: ES2Plus_Tests: cleanup/add module parameters
......................................................................
ES2Plus_Tests: cleanup/add module parameters
The ES2Plus_Tests only have minimal configuration options. Let's remove
hardcoded options and replace them with module parameters. Let's also
document the module parameters.
Change-Id: Ib8e128e4af8e819799c4d7ea3e6a36189462f382
Related: SYS#7339
---
M smdpp/ES2Plus_Tests.ttcn
1 file changed, 41 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/41250/1
diff --git a/smdpp/ES2Plus_Tests.ttcn b/smdpp/ES2Plus_Tests.ttcn
index c6e84cd..8d35670 100644
--- a/smdpp/ES2Plus_Tests.ttcn
+++ b/smdpp/ES2Plus_Tests.ttcn
@@ -30,22 +30,46 @@
const charstring c_eid1 := "89049032123451234512345678901235";
const charstring c_eid2 := "89049032123451234512345678901236";
-// Client certificate paths
-const charstring c_cert_path := "./test_certs/CERT_MNO_ECDSA_NIST.pem";
-const charstring c_key_path := "./test_certs/SK_MNO_ECDSA_NIST.pem";
-
-// Wrong certificate for testing
+// Wrong certificate for testing (randomly picked from the sgp26 directory)
const charstring c_wrong_cert_path := "./sgp26/eUICC/CERT_EUICC_ECDSA_NIST.der";
const charstring c_wrong_key_path := "./sgp26/eUICC/SK_EUICC_ECDSA_NIST.pem";
+// The external function ext_RSPClient_create requires a path and a name filter as input to load test certificates.
+// While those certfiicates are required for the ES9+ interface related tests (smdpp_Tests.ttcn), for the ES2+
+// interface tests those certificates have no relevance.
+const charstring c_es2plus_cert_path := "./sgp26/";
+const charstring c_es2plus_cert_name_filter := "NIST";
+
// Module parameters
modulepar {
+ //The server host name must match the host name in the SSL certificate of the server. To bind the
+
+ // The SMDP server host name (FQDN) must match the host name of the SSL certificate of the server. To resolve the
+ // server host name to an IP address, an entry in /etc/hosts is sufficient. It should also be pointed out that this
+ // testsuite (libcurl) will also verify the presented server certificate against the related CA. To ensure that
+ // the server certificate verification is possible, ensure that the related CA certificates are made available in
+ // /etc/ssl/certs
charstring mp_es2plus_server_host := "testsmdpplus1.example.com";
- integer mp_es9_server_port := 8000;
- integer mp_es2plus_server_port := 8000; // NIST tests use port 8000
+
+ // Sets the server port of the ES2+ server (SM-DP+).
+ integer mp_es2plus_server_port := 8000;
+
+ // Sets the client certificate to be used to authenticate towards the ES2+ server (SM-DP+)
+ charstring mp_es2plus_client_cert_path := "./test_certs/CERT_MNO_ECDSA_NIST.pem";
+
+ // Sets the private key to be used to authenticate towards the ES2+ server (SM-DP+)
+ charstring mp_es2plus_client_key_path := "./test_certs/SK_MNO_ECDSA_NIST.pem";
+
+ // Sets the operator ID to be used on the ES2+ interface. (this parameter has no relation to SSL/TLS)
charstring mp_operator_id := "test.operator.com";
- charstring mp_nist_rsp_cert_path := "./sgp26/";
+
+ // ES2+ normally uses SSL with client authentication, however for debug purposes it is possible to disable
+ // SSL entirely.
boolean mp_use_ssl := true; // SSL with mutual TLS authentication enabled
+
+ // ES2+ normally uses SSL with client authentication, however for debug purposes it is possible to disable
+ // mutual authentication.
+ boolean mp_use_mutual_tls := true;
}
// Test component - extend smdpp_ConnHdlr to reuse RSPClient functionality
@@ -175,8 +199,8 @@
g_rsp_client_handle := smdpp_Tests.ext_RSPClient_create(
mp_es2plus_server_host,
mp_es2plus_server_port,
- mp_nist_rsp_cert_path,
- "NIST"
+ c_es2plus_cert_path,
+ c_es2plus_cert_name_filter
);
if (g_rsp_client_handle < 0) {
@@ -187,9 +211,9 @@
// Set authentication parameters once for all ES2+ operations
var integer result := smdpp_Tests.ext_RSPClient_setAuthParams(
g_rsp_client_handle,
- true, // useMutualTLS
- c_cert_path,
- c_key_path
+ mp_use_mutual_tls,
+ mp_es2plus_client_cert_path,
+ mp_es2plus_client_key_path
);
if (result != 0) {
@@ -961,7 +985,7 @@
// Temporarily set wrong authentication parameters
var integer result := smdpp_Tests.ext_RSPClient_setAuthParams(
g_rsp_client_handle,
- true, // useMutualTLS
+ mp_use_mutual_tls,
c_wrong_cert_path, // Using wrong certificate
c_wrong_key_path // Using wrong key
);
@@ -994,9 +1018,9 @@
// Restore correct auth params for cleanup
smdpp_Tests.ext_RSPClient_setAuthParams(
g_rsp_client_handle,
- true,
- c_cert_path,
- c_key_path
+ mp_use_mutual_tls,
+ mp_es2plus_client_cert_path,
+ mp_es2plus_client_key_path
);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41250?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib8e128e4af8e819799c4d7ea3e6a36189462f382
Gerrit-Change-Number: 41250
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41249?usp=email )
Change subject: smdpp_tests: extend comment with hint on CA cert locations
......................................................................
smdpp_tests: extend comment with hint on CA cert locations
Let's extend the comment around mp_es2plus_server_host and mention that
CA certfiicates should be made availablein /etc/ssl/certs. In case the
CA certificate is not present in /etc/ssl/certs, libcurl will refuse
to connect.
Change-Id: I58d4f35c8493a9f9531da8d7c565760a08101e35
Related: SYS#7339
---
M smdpp/smdpp_Tests.ttcn
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/41249/1
diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn
index 7a300a2..119ad08 100644
--- a/smdpp/smdpp_Tests.ttcn
+++ b/smdpp/smdpp_Tests.ttcn
@@ -383,7 +383,10 @@
var smdpp_ConnHdlrPars pars := {
/* Unfortunately the SMDP server FQDN cannot be made configurable via a module parameter since it always
* to match the FQDN in the test SSL certificates. To resolve the server FQDN to an IP address, an entry
- * in /etc/hosts is sufficient. */
+ * in /etc/hosts is sufficient. It should also be pointed out that this testsuite (libcurl) will also
+ * verify the presented server certificate against the related CA. To ensure that the server certificate
+ * verification is possible, ensure that the related CA certificates are made available in
+ * /etc/ssl/certs */
smdp_server_fqdn := "testsmdpplus1.example.com",
smdp_es2p_server_port := mp_es2plus_server_port,
cert_path := "./sgp26/CertificateIssuer",
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41249?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I58d4f35c8493a9f9531da8d7c565760a08101e35
Gerrit-Change-Number: 41249
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>