Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Only export needed wrapper API
......................................................................
Only export needed wrapper API
Otherwise the asn_* symbols collide with other generated skeletons on
apps/library clients (eg. libasn1c.git).
Related: OS#6895
Related: OS#6896
Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
---
M include/osmocom/tcap/Makefile.am
A include/osmocom/tcap/tcap.h
M src/Makefile.am
A src/tcap.c
M tests/parse/Makefile.am
5 files changed, 62 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-asn1-tcap refs/changes/83/41583/4
--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
Gerrit-Change-Number: 41583
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: Only export needed wrapper API
......................................................................
Only export needed wrapper API
Otherwise the asn_* symbols collide with other generated skeletons on
apps/library clients (eg. libasn1c.git).
Related: OS#6895
Related: OS#6896
Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
---
M include/osmocom/tcap/Makefile.am
A include/osmocom/tcap/tcap.h
M src/Makefile.am
A src/tcap.c
M tests/parse/Makefile.am
5 files changed, 55 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-asn1-tcap refs/changes/83/41583/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
Gerrit-Change-Number: 41583
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Only export needed wrapper API
......................................................................
Only export needed wrapper API
Otherwise the asn_* symbols collide with other generated skeletons on
apps/library clients (eg. libasn1c.git).
Related: OS#6895
Related: OS#6896
Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
---
M include/osmocom/tcap/Makefile.am
A include/osmocom/tcap/tcap.h
M src/Makefile.am
A src/tcap.c
4 files changed, 54 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-asn1-tcap refs/changes/83/41583/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
Gerrit-Change-Number: 41583
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email )
Change subject: Only export needed wrapper API
......................................................................
Only export needed wrapper API
Otherwise the asn_* symbols collide with other generated skeletons on
apps/library clients (eg. libasn1c.git).
Related: OS#6895
Related: OS#6896
Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
---
M include/osmocom/tcap/Makefile.am
A include/osmocom/tcap/tcap.h
M src/Makefile.am
A src/tcap.c
4 files changed, 54 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-asn1-tcap refs/changes/83/41583/1
diff --git a/include/osmocom/tcap/Makefile.am b/include/osmocom/tcap/Makefile.am
index d0a425a..304958b 100644
--- a/include/osmocom/tcap/Makefile.am
+++ b/include/osmocom/tcap/Makefile.am
@@ -98,6 +98,7 @@
osmo_asn1_tcap_HEADERS = \
$(SKEL_HEADER_FILES) \
$(GEN_HEADER_FILES) \
+ tcap.h \
version.h \
$(NULL)
diff --git a/include/osmocom/tcap/tcap.h b/include/osmocom/tcap/tcap.h
new file mode 100644
index 0000000..0ef371e
--- /dev/null
+++ b/include/osmocom/tcap/tcap.h
@@ -0,0 +1,9 @@
+/* libosmo-asn1-tcap public API */
+#pragma once
+
+#include <stdint.h>
+#include <unistd.h>
+
+#include <osmocom/tcap/TCAP_TCMessage.h>
+
+int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, size_t data_len);
diff --git a/src/Makefile.am b/src/Makefile.am
index fd5a167..d56c7ce 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+AM_CFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/skel $(ASN_MODULE_CFLAGS)
+
SKEL_SRC = \
skel/ANY.c \
skel/ANY_ber.c \
@@ -197,10 +199,10 @@
# documentation before making any modification
LIBVERSION=0:0:0
-#INCLUDES = $(all_includes) -I/usr/local/include/asn1c -I$(top_srcdir)/include
-AM_CFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/skel $(ASN_MODULE_CFLAGS)
+libosmo_sigtran_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined -export-symbols-regex '^osmo_'
libosmo_asn1_tcap_la_SOURCES = \
+ tcap.c \
$(ASN_MODULE_SRC)
lib_LTLIBRARIES=libosmo-asn1-tcap.la
diff --git a/src/tcap.c b/src/tcap.c
new file mode 100644
index 0000000..f8dcf35
--- /dev/null
+++ b/src/tcap.c
@@ -0,0 +1,40 @@
+/* libosmo-asn1-tcap public API */
+/* (C) 2025 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de>
+ * All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <stdint.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <osmocom/tcap/asn_codecs.h>
+#include <osmocom/tcap/TCAP_TCMessage.h>
+
+int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, size_t data_len)
+{
+
+ asn_dec_rval_t asn_rc;
+
+ memset(tcapmsg, 0, sizeof(struct TCAP_TCMessage));
+
+ asn_rc = ber_decode(0, &asn_DEF_TCAP_TCMessage, (void **)&tcapmsg, data, data_len);
+ if (asn_rc.code != RC_OK)
+ return -EINVAL;
+ return 0;
+}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41583?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I6d97ac94be91064be7203b11cffa4de9056afce1
Gerrit-Change-Number: 41583
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41582?usp=email )
Change subject: Remove unneeded asn1c-fixup.patch
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41582?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I219e17e9439405dc3488b437a234623807f1d8ab
Gerrit-Change-Number: 41582
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 04 Dec 2025 16:41:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41581?usp=email )
Change subject: ts_31_102: EF SUCI_Calc_Info: fix decoding empty files
......................................................................
ts_31_102: EF SUCI_Calc_Info: fix decoding empty files
When trying to use `edit_binary_decoded` with an empty file, pysim
runs into a len(None) exception, because hpkl.to_dict()['hnet_pubkey_list'] returns
None.
Can reproduced with a CCC Camp 2023 usim and editing the file.
Change-Id: Ib8e322e65dd768bfd49e7a5620a2163f12a74ec7
---
M pySim/ts_31_102.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/41581/1
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 4ee6621..1f46241 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -389,7 +389,10 @@
# remaining data holds Home Network Public Key Data Object
hpkl = EF_SUCI_Calc_Info.HnetPubkeyList()
hpkl.from_tlv(in_bytes[pos:])
- hnet_pubkey_list = self._compact_pubkey_list(hpkl.to_dict()['hnet_pubkey_list'])
+
+ hnet_pubkey_list = []
+ if hpkl.to_dict()['hnet_pubkey_list']:
+ hnet_pubkey_list = self._compact_pubkey_list(hpkl.to_dict()['hnet_pubkey_list'])
return {
'prot_scheme_id_list': prot_scheme_id_list,
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41581?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: Ib8e322e65dd768bfd49e7a5620a2163f12a74ec7
Gerrit-Change-Number: 41581
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41579?usp=email )
Change subject: pySim.runtime: Fix file selection by upper case hex FID
......................................................................
pySim.runtime: Fix file selection by upper case hex FID
When trying to remove a file (e.g. DF.5G_ProSe, 5FF0),
there seems to be a case sensitive check when checking for the dict:
pySim/runtime.py: get_file_for_filename():
478 def get_file_for_filename(self, name: str):
479 """Get the related CardFile object for a specified filename."""
480 sels = self.selected_file.get_selectables()
481 return sels[name]
The dict sels contains 5ff0, but not 5FF0.
The type of argument name is str. So a case sensitive check will be used.
Change-Id: Idd0db1f4bbd3ee9eec20f5fd0f4371c2882950cd
Closes: OS#6898
---
M pySim/runtime.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/41579/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 597323f..35452a0 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -477,11 +477,15 @@
def get_file_for_filename(self, name: str):
"""Get the related CardFile object for a specified filename."""
+ if is_hex(name):
+ name = name.lower()
sels = self.selected_file.get_selectables()
return sels[name]
def activate_file(self, name: str):
"""Request ACTIVATE FILE of specified file."""
+ if is_hex(name):
+ name = name.lower()
sels = self.selected_file.get_selectables()
f = sels[name]
data, sw = self.scc.activate_file(f.fid)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41579?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: Idd0db1f4bbd3ee9eec20f5fd0f4371c2882950cd
Gerrit-Change-Number: 41579
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>