pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/41451?usp=email )
Change subject: vty: Drop SS7 route info in 'show cnlink'
......................................................................
vty: Drop SS7 route info in 'show cnlink'
Route information is nowadays a complex topic which is mostly handled by
libosmo-sigtran, and it can be configured and better queried using VTY
commands also provided by libosmo-sigtran.
This SS7 route information here is not relevant and moreover the API it
uses is deprecated. Drop it.
Change-Id: I2b029e99da45408f9fed41f9f280d19eb646d548
---
M src/osmo-hnbgw/hnbgw_vty.c
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/51/41451/1
diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index f463522..f1b128c 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -125,7 +125,6 @@
static void _show_cnlink(struct vty *vty, struct hnbgw_cnlink *cnlink)
{
- struct osmo_ss7_route *rt;
struct osmo_ss7_instance *ss7;
if (!cnlink) {
@@ -158,8 +157,6 @@
hnbgw_cnlink_sccp_addr_to_str(cnlink, &cnlink->remote_addr),
VTY_NEWLINE);
- rt = osmo_ss7_route_lookup(ss7, cnlink->remote_addr.pc);
- vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE);
vty_out(vty, " RANAP state: %s%s", osmo_fsm_inst_state_name(cnlink->fi), VTY_NEWLINE);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/41451?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I2b029e99da45408f9fed41f9f280d19eb646d548
Gerrit-Change-Number: 41451
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41450?usp=email )
Change subject: card_key_provider: separate column decryption
......................................................................
card_key_provider: separate column decryption
The concrete class CardKeyProviderCsv supports the decryption of
encrypted CSV columns (fields). However, this kind of mechanmism
may also be useful in with other data formats we may implement in
the future, so let' slplit the encryption part into a seperate
class from which we may inherit.
Related: SYS#7725
Change-Id: I180457d4938f526d227c81020e4e03c6b3a57dab
---
M pySim/card_key_provider.py
1 file changed, 46 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/41450/1
diff --git a/pySim/card_key_provider.py b/pySim/card_key_provider.py
index d5541b0..e1fa49e 100644
--- a/pySim/card_key_provider.py
+++ b/pySim/card_key_provider.py
@@ -10,7 +10,7 @@
operation with pySim-shell.
"""
-# (C) 2021-2024 by Sysmocom s.f.m.c. GmbH
+# (C) 2021-2025 by Sysmocom s.f.m.c. GmbH
# All Rights Reserved
#
# Author: Philipp Maier, Harald Welte
@@ -89,33 +89,30 @@
dictionary of {field, value} strings for each requested field from 'fields'
"""
+class CardKeyFieldDecrypter(abc.ABC):
+ """
+ A Card key field decryptor class that may be used by Card key provider implementations to add support for
+ a column-based encryption to protect sensitive material (cryptographic key material, ADM keys, etc.).
+ The sensitive material is encrypted using a "key-encryption key", occasionally also known as "transport key"
+ before it is stored into a file or database (see also GSMA FS.28). The "transport key" is then used to decrypt
+ the key material on demand using this class.
+ """
-class CardKeyProviderCsv(CardKeyProvider):
- """Card key provider implementation that allows to query against a specified CSV file.
- Supports column-based encryption as it is generally a bad idea to store cryptographic key material in
- plaintext. Instead, the key material should be encrypted by a "key-encryption key", occasionally also
- known as "transport key" (see GSMA FS.28)."""
- IV = b'\x23' * 16
- csv_file = None
- filename = None
-
- def __init__(self, filename: str, transport_keys: dict):
+ def _set_transport_keys(self, transport_keys: dict):
"""
+ Set transport keys, usually one for each column. In some cases it is also possible to use a single key for multiple
+ columns (see also CRYPT_GROUPS)
+
Args:
- filename : file name (path) of CSV file containing card-individual key/data
transport_keys : a dict indexed by field name, whose values are hex-encoded AES keys for the
- respective field (column) of the CSV. This is done so that different fields
+ respective field (column) of the CSV. This is done so that different fields
(columns) can use different transport keys, which is strongly recommended by
GSMA FS.28
"""
- self.csv_file = open(filename, 'r')
- if not self.csv_file:
- raise RuntimeError("Could not open CSV file '%s'" % filename)
- self.filename = filename
- self.transport_keys = self.process_transport_keys(transport_keys)
+ self.transport_keys = self.__process_transport_keys(transport_keys)
@staticmethod
- def process_transport_keys(transport_keys: dict):
+ def __process_transport_keys(transport_keys: dict):
"""Apply a single transport key to multiple fields/columns, if the name is a group."""
new_dict = {}
for name, key in transport_keys.items():
@@ -127,12 +124,41 @@
return new_dict
def _decrypt_field(self, field_name: str, encrypted_val: str) -> str:
- """decrypt a single field, if we have a transport key for the field of that name."""
+ """
+ Decrypt a single field. The decryption is only applied if we have a transport key is known under the provided
+ field name, otherwise the field is treated as plaintext and passed through as it is.
+
+ Args:
+ field_name : name of the field to decrypt (used to identify which key to use)
+ encrypted_val : encrypted field value
+
+ Returns:
+ plaintext field value
+ """
if not field_name in self.transport_keys:
return encrypted_val
cipher = AES.new(h2b(self.transport_keys[field_name]), AES.MODE_CBC, self.IV)
return b2h(cipher.decrypt(h2b(encrypted_val)))
+class CardKeyProviderCsv(CardKeyFieldDecrypter, CardKeyProvider):
+ """Card key provider implementation that allows to query against a specified CSV file."""
+
+ IV = b'\x23' * 16
+ csv_file = None
+ filename = None
+
+ def __init__(self, filename: str, transport_keys: dict):
+ """
+ Args:
+ filename : file name (path) of CSV file containing card-individual key/data
+ transport_keys : (see class CardKeyFieldDecrypter)
+ """
+ self.csv_file = open(filename, 'r')
+ if not self.csv_file:
+ raise RuntimeError("Could not open CSV file '%s'" % filename)
+ self.filename = filename
+ self._set_transport_keys(transport_keys)
+
def get(self, fields: List[str], key: str, value: str) -> Dict[str, str]:
super()._verify_get_data(fields, key, value)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41450?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: I180457d4938f526d227c81020e4e03c6b3a57dab
Gerrit-Change-Number: 41450
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Code-Review-1 by daniel, Verified-1 by Jenkins Builder
Change subject: sccplite: Handle MGCP/CTRL over SCCPLite multiplex using MTP-TRANSFER.req/ind
......................................................................
sccplite: Handle MGCP/CTRL over SCCPLite multiplex using MTP-TRANSFER.req/ind
This is needed ie. in SCCPLite, where MGCP and CTRL messages need to be
sent/received over the same IPA multiplex TCP conn as the SCCPLite
(SCCP/IPA) one towards a given MSC.
Prior to this, osmo-bsc-sccplite was doing lots of manual
libosmo-sigtran APIs to obtain a route, an AS, and ASP, sending over an
ASP, etc. Similary, the rx_unknown callback was added to libosmo-sigtran
to hook into the ASP level. Tons of stuff which should really be done
properly inside libosmo-sigtran and provided over the existing public
SAPs, as this patch proposes.
With the proposed approach, an SCCPLite client (eg. osmo-bsc), besides
setting up an sccp_user to handle SCCP, also sets an ss7_user (MTP SAP)
with the newly introduced new Service Indicator (SI) MTP_SI_NI11_OSMO_IPA
to be able to manage the IPA[MGCP/CTRL] traffic towards a given MTP peer
(SCCPLite client, ie. MSC).
Related: SYS#6880
Depends: libosmo-sigtran.git Change-Id I9fedb26ccd3434fc7f272feb3c45cf4bdb80c7ae
Change-Id: I567ed206eab1add21836bfd937f3790d3d7a00d7
---
M TODO-RELEASE
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/osmo_bsc_sigtran.h
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
6 files changed, 157 insertions(+), 116 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/00/41400/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I567ed206eab1add21836bfd937f3790d3d7a00d7
Gerrit-Change-Number: 41400
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email )
Change subject: sccplite: Handle MGCP/CTRL over SCCPLite multiplex using MTP-TRANSFER.req/ind
......................................................................
Patch Set 4:
(2 comments)
File src/osmo-bsc/osmo_bsc_mgcp.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/41400/comment/bb0d54d5_dbfd71c9?usp… :
PS4, Line 160: msg = msgb_alloc_headroom(1400, 64, "MGCP->IPA");
> Is this related to the rest of the patch?
Yes, we now need more headroom to prepend the mtp_sap primitive .
File src/osmo-bsc/osmo_bsc_sigtran.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/41400/comment/f2c4940f_0e25219c?usp… :
PS4, Line 466: }
> I think you're missing a return/error handling here
Indeed, thanks!
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I567ed206eab1add21836bfd937f3790d3d7a00d7
Gerrit-Change-Number: 41400
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 17 Nov 2025 14:48:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>