Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41251?usp=email )
Change subject: pySim-shell: allow user friendly selection of the pin type
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS1:
> I also think that this should be more user friendly. I will see what I can do. […]
Done
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/41251/comment/6d0790e4_5fa23265?usp=em… :
PS2, Line 942:
> vague hypothesis regarding the linter error: it might be that (the linter things) this is not possib […]
Done
--
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: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0b58c402d95cbc4fe690e6edb214829d463e9f2c
Gerrit-Change-Number: 41251
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 01 Nov 2025 14:03:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41251?usp=email )
Change subject: pySim-shell: allow user friendly selection of the pin type
......................................................................
Patch Set 3: Code-Review+2
--
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: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0b58c402d95cbc4fe690e6edb214829d463e9f2c
Gerrit-Change-Number: 41251
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 01 Nov 2025 14:03:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41293?usp=email )
Change subject: osmo-smdpp: update commandline help and default port
......................................................................
osmo-smdpp: update commandline help and default port
osmo-smdpp has built-in TLS support for some time now. Let's update
update the commandline help to be more concise.
Since the built-in SSL/TLS support is enabled by default, let's also
update the default port from 8000 to 443.
Change-Id: Ib5a069a8612beb1a9716a7514b498ec70d141178
---
M osmo-smdpp.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index ed5046d..d1d6fd7 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -861,10 +861,10 @@
def main(argv):
parser = argparse.ArgumentParser()
- parser.add_argument("-H", "--host", help="Host/IP to bind HTTP to", default="localhost")
- parser.add_argument("-p", "--port", help="TCP port to bind HTTP to", default=8000)
+ parser.add_argument("-H", "--host", help="Host/IP to bind HTTP(S) to", default="localhost")
+ parser.add_argument("-p", "--port", help="TCP port to bind HTTP(S) to", default=443)
parser.add_argument("-c", "--certdir", help=f"cert subdir relative to {DATA_DIR}", default="certs")
- parser.add_argument("-s", "--nossl", help="do NOT use ssl", action='store_true', default=False)
+ parser.add_argument("-s", "--nossl", help="disable built in SSL/TLS support", action='store_true', default=False)
parser.add_argument("-v", "--verbose", help="dump more raw info", action='store_true', default=False)
parser.add_argument("-b", "--brainpool", help="Use Brainpool curves instead of NIST",
action='store_true', default=False)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41293?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib5a069a8612beb1a9716a7514b498ec70d141178
Gerrit-Change-Number: 41293
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41294?usp=email )
Change subject: osmo-smdpp: update documentation
......................................................................
osmo-smdpp: update documentation
osmo-smdpp has built-in SSL/TLS support for quite some time now. The manual does not
yet mention this feature yet.
Change-Id: I2db5ae32914386a34eab1ed7d2aff8cae82bfa9b
---
M docs/osmo-smdpp.rst
1 file changed, 28 insertions(+), 12 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/docs/osmo-smdpp.rst b/docs/osmo-smdpp.rst
index 3502003..dc32db7 100644
--- a/docs/osmo-smdpp.rst
+++ b/docs/osmo-smdpp.rst
@@ -40,16 +40,21 @@
Running osmo-smdpp
------------------
-osmo-smdpp does not have built-in TLS support as the used *twisted* framework appears to have
-problems when using the example elliptic curve certificates (both NIST and Brainpool) from GSMA.
+osmo-smdpp comes with built-in TLS support which is enabled by default. However, it is always possible to
+disable the built-in TLS support if needed.
-So in order to use it, you have to put it behind a TLS reverse proxy, which terminates the ES9+
-HTTPS from the LPA, and then forwards it as plain HTTP to osmo-smdpp.
+In order to use osmo-smdpp without the built-in TLS support, it has to be put behind a TLS reverse proxy,
+which terminates the ES9+ HTTPS traffic from the LPA, and then forwards it as plain HTTP to osmo-smdpp.
+
+NOTE: The built in TLS support in osmo-smdpp makes use of the python *twisted* framework. Older versions
+of this framework appear to have problems when using the example elliptic curve certificates (both NIST and
+Brainpool) from GSMA.
+
nginx as TLS proxy
~~~~~~~~~~~~~~~~~~
-If you use `nginx` as web server, you can use the following configuration snippet::
+If you chose to use `nginx` as TLS reverse proxy, you can use the following configuration snippet::
upstream smdpp {
server localhost:8000;
@@ -92,32 +97,43 @@
commandline options
~~~~~~~~~~~~~~~~~~~
-Typically, you just run it without any arguments, and it will bind its plain-HTTP ES9+ interface to
-`localhost` TCP port 8000.
+Typically, you just run osmo-smdpp without any arguments, and it will bind its built-in HTTPS ES9+ interface to
+`localhost` TCP port 443. In this case an external TLS reverse proxy is not needed.
osmo-smdpp currently doesn't have any configuration file.
There are command line options for binding:
-Bind the HTTP ES9+ to a port other than 8000::
+Bind the HTTPS ES9+ to a port other than 443::
- ./osmo-smdpp.py -p 8001
+ ./osmo-smdpp.py -p 8443
+
+Disable the built-in TLS support and bind the plain-HTTP ES9+ to a port 8000::
+
+ ./osmo-smdpp.py -p 8000 --nossl
Bind the HTTP ES9+ to a different local interface::
- ./osmo-smdpp.py -H 127.0.0.1
+ ./osmo-smdpp.py -H 127.0.0.2
DNS setup for your LPA
~~~~~~~~~~~~~~~~~~~~~~
The LPA must resolve `testsmdpplus1.example.com` to the IP address of your TLS proxy.
-It must also accept the TLS certificates used by your TLS proxy.
+It must also accept the TLS certificates used by your TLS proxy. In case osmo-smdpp is used with built-in TLS support,
+it will use the certificates provided in smdpp-data.
+
+NOTE: The HTTPS ES9+ interface cannot be addressed by the LPA directly via its IP address. The reason for this is that
+the included SGP.26 (DPtls) test certificates explicitly restrict the hostname to `testsmdpplus1.example.com` in the
+`X509v3 Subject Alternative Name` extension. Using a bare IP address as hostname may cause the certificate to be
+rejected by the LPA.
+
Supported eUICC
~~~~~~~~~~~~~~~
-If you run osmo-smdpp with the included SGP.26 certificates, you must use an eUICC with matching SGP.26
+If you run osmo-smdpp with the included SGP.26 (DPauth, DPpb) certificates, you must use an eUICC with matching SGP.26
certificates, i.e. the EUM certificate must be signed by a SGP.26 test root CA and the eUICC certificate
in turn must be signed by that SGP.26 EUM certificate.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41294?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2db5ae32914386a34eab1ed7d2aff8cae82bfa9b
Gerrit-Change-Number: 41294
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: Hoernchen, dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41293?usp=email )
Change subject: osmo-smdpp: update commandline help and default port
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41293?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib5a069a8612beb1a9716a7514b498ec70d141178
Gerrit-Change-Number: 41293
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 01 Nov 2025 14:02:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
keith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email )
(
7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: sqlite optimisation: Avoid unneeded database operation
......................................................................
sqlite optimisation: Avoid unneeded database operation
It is pointless to mark an SMS as sent immediatly
before deleting it. Let's avoid the extra database
overhead involved in doing this operation.
We change the db function which is used to delete
SMS, changing the where clause, so let's also
remove the word "sent" in the function name,
now: db_sms_delete_message_by_id()
This function is only called from one place; when
deleting sent messages, but better the name
reflects what it actually does. By the same logic,
the database statement is now called "DEL_BY_ID" and
ends up being a duplicate of what was denoted as
DEL_EXPIRED, so remove this later, which in itself has
nothing to do with the validity or expiration, but was
called from delete_expired_sms(). Call the DEL_BY_ID
statement there instead, which is a more accurate descrption
of the actual statement being run.
The unit test is changed now that we cannot
delete based on sent status anymore.
Change-Id: I777155c0f818b979c636bb59953719e472771603
---
M include/osmocom/msc/db.h
M src/libmsc/db.c
M src/libmsc/gsm_04_11.c
M src/libmsc/sms_queue.c
M tests/db_sms/db_sms_test.c
M tests/db_sms/db_sms_test.ok
6 files changed, 12 insertions(+), 24 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/include/osmocom/msc/db.h b/include/osmocom/msc/db.h
index fc1781b..61c46ee 100644
--- a/include/osmocom/msc/db.h
+++ b/include/osmocom/msc/db.h
@@ -49,7 +49,7 @@
int db_sms_mark_delivered(struct gsm_sms *sms);
int db_sms_inc_deliver_attempts(struct gsm_sms *sms);
int db_sms_delete_by_msisdn(const char *msisdn);
-int db_sms_delete_sent_message_by_id(unsigned long long sms_id);
+int db_sms_delete_message_by_id(unsigned long long sms_id);
int db_sms_delete_expired_message_by_id(unsigned long long sms_id);
void db_sms_delete_oldest_expired_message(void);
diff --git a/src/libmsc/db.c b/src/libmsc/db.c
index 43454d6..de008ad 100644
--- a/src/libmsc/db.c
+++ b/src/libmsc/db.c
@@ -53,7 +53,6 @@
DB_STMT_SMS_INC_DELIVER_ATTEMPTS,
DB_STMT_SMS_DEL_BY_MSISDN,
DB_STMT_SMS_DEL_BY_ID,
- DB_STMT_SMS_DEL_EXPIRED,
DB_STMT_SMS_GET_VALID_UNTIL_BY_ID,
DB_STMT_SMS_GET_OLDEST_EXPIRED,
_NUM_DB_STMT
@@ -299,8 +298,6 @@
[DB_STMT_SMS_DEL_BY_MSISDN] =
"DELETE FROM SMS WHERE src_addr=$src_addr OR dest_addr=$dest_addr",
[DB_STMT_SMS_DEL_BY_ID] =
- "DELETE FROM SMS WHERE id = $id AND sent is NOT NULL",
- [DB_STMT_SMS_DEL_EXPIRED] =
"DELETE FROM SMS WHERE id = $id",
[DB_STMT_SMS_GET_VALID_UNTIL_BY_ID] =
"SELECT strftime('%s', valid_until) FROM SMS WHERE id = $id",
@@ -966,7 +963,7 @@
return 0;
}
-int db_sms_delete_sent_message_by_id(unsigned long long sms_id)
+int db_sms_delete_message_by_id(unsigned long long sms_id)
{
OSMO_ASSERT(g_dbc);
sqlite3_stmt *stmt = g_dbc->stmt[DB_STMT_SMS_DEL_BY_ID];
@@ -988,7 +985,7 @@
static int delete_expired_sms(unsigned long long sms_id, time_t validity_timestamp)
{
OSMO_ASSERT(g_dbc);
- sqlite3_stmt *stmt = g_dbc->stmt[DB_STMT_SMS_DEL_EXPIRED];
+ sqlite3_stmt *stmt = g_dbc->stmt[DB_STMT_SMS_DEL_BY_ID];
time_t now;
int rc;
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index fad2f4b..530ef17 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -888,9 +888,6 @@
GSM411_RP_CAUSE_PROTOCOL_ERR);
}
- /* mark this SMS as sent in database */
- db_sms_mark_delivered(sms);
-
send_signal(S_SMS_DELIVERED, trans, sms, 0);
if (sms->status_rep_req)
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index 4ef4601..8b53725 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -615,7 +615,9 @@
vsub = pending->vsub;
vlr_subscr_get(vsub, __func__);
if (smq->cfg->delete_delivered)
- db_sms_delete_sent_message_by_id(pending->sms_id);
+ db_sms_delete_message_by_id(pending->sms_id);
+ else
+ db_sms_mark_delivered(sig_sms->sms);
sms_pending_free(smq, pending);
/* Attempt to send another SMS to this subscriber */
sms_send_next(vsub);
diff --git a/tests/db_sms/db_sms_test.c b/tests/db_sms/db_sms_test.c
index 352ec01..5a4ad13 100644
--- a/tests/db_sms/db_sms_test.c
+++ b/tests/db_sms/db_sms_test.c
@@ -451,22 +451,15 @@
{
int rc;
- LOGP(DDB, LOGL_INFO, "Testing db_sms_delete_sent_message_by_id()...\n");
+ LOGP(DDB, LOGL_INFO, "Testing db_sms_delete_message_by_id()...\n");
- /* Delete #1, which is marked as sent */
- LOGP(DDB, LOGL_NOTICE, "db_sms_delete_sent_message_by_id(#1, sent): ");
- rc = db_sms_delete_sent_message_by_id(1);
+ /* Delete #1, - (we cannot delete based on sent status) */
+ LOGP(DDB, LOGL_NOTICE, "db_sms_delete_message_by_id(#1): ");
+ rc = db_sms_delete_message_by_id(1);
LOGPC(DDB, LOGL_NOTICE, "rc=%d\n", rc);
/* Don't expect to retrieve this message anymore */
sms_test_set[0].exp_db_sms_get_fail = true;
- /* Try to delete #3, which is not marked as sent */
- LOGP(DDB, LOGL_NOTICE, "db_sms_delete_sent_message_by_id(#3, not sent): ");
- rc = db_sms_delete_sent_message_by_id(3);
- LOGPC(DDB, LOGL_NOTICE, "rc=%d\n", rc);
- /* Do expect to retrieve this message anyway */
- sms_test_set[2].exp_db_sms_get_fail = false;
-
LOGP(DDB, LOGL_INFO, "Testing db_sms_delete_by_msisdn()...\n");
LOGP(DDB, LOGL_NOTICE, "db_sms_delete_by_msisdn('72631'): ");
diff --git a/tests/db_sms/db_sms_test.ok b/tests/db_sms/db_sms_test.ok
index 486dcc3..03e5b11 100644
--- a/tests/db_sms/db_sms_test.ok
+++ b/tests/db_sms/db_sms_test.ok
@@ -44,9 +44,8 @@
DDB DEBUG Marking #2 as delivered: rc=0
DDB NOTICE db_sms_get_next_unsent(starting from #1): found
DDB NOTICE verify_sms('Complete TP-UD (160 septets, 7-bit encoding)'): TP-User-Data mismatch
-DDB INFO Testing db_sms_delete_sent_message_by_id()...
-DDB NOTICE db_sms_delete_sent_message_by_id(#1, sent): rc=0
-DDB NOTICE db_sms_delete_sent_message_by_id(#3, not sent): rc=0
+DDB INFO Testing db_sms_delete_message_by_id()...
+DDB NOTICE db_sms_delete_message_by_id(#1): rc=0
DDB INFO Testing db_sms_delete_by_msisdn()...
DDB NOTICE db_sms_delete_by_msisdn('72631'): rc=0
DDB INFO Testing db_sms_delete_oldest_expired_message()...
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I777155c0f818b979c636bb59953719e472771603
Gerrit-Change-Number: 28340
Gerrit-PatchSet: 8
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>