Attention is currently required from: Hoernchen.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/40467?usp=email )
Change subject: smdpp: validate eid
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File osmo-smdpp.py:
https://gerrit.osmocom.org/c/pysim/+/40467/comment/8ee3f68c_cb5173a0?usp=em… :
PS1, Line 76: Returns 'O' for old variant
note that all of the existing code covers SGP.22 v2.x and hence only supports "O". All the other variants with intermediate certs are SGP.22 v3.x which is not yet supported in osmo-smdpp and not really used much in practice in general.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40467?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: Ice704548cb62f14943927b5295007db13c807031
Gerrit-Change-Number: 40467
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Jun 2025 20:24:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: Hoernchen.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/40465?usp=email )
Change subject: smdpp: update certs, prune old certs
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
the commit misses to state the most important question of every commit: why.
We can see from the diff that it replaces certs. but why. Also: Where does that zip file originate from (URI, ...).
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40465?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: I25442d6f55a385019bba1e47ad3d795120f850ad
Gerrit-Change-Number: 40465
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Jun 2025 20:23:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Hoernchen.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/40464?usp=email )
Change subject: smdpp: add proper tls support, cert generation
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
I'm not sure how re-generating the SGP.26 CI certificates would work _unless_ you were to re-use the SGP.26 CI private key? The point of SGP.26 is that they all are derived from the same well-known CI, and all derived certificates can be validated against the exact SGP.26 CA certificate that is published.
File contrib/generate_certs.py:
https://gerrit.osmocom.org/c/pysim/+/40464/comment/51e89c38_e807ad06?usp=em… :
PS1, Line 4: Fa
maybe a bit more context here (that this is about certificates for osmo-smdpp)? The name could also be called generate_smdpp_certs.py to make it obvious what kind of certs we're referring to?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40464?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: I84b2666422b8ff565620f3827ef4d4d7635a21be
Gerrit-Change-Number: 40464
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Jun 2025 20:21:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Hoernchen.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/40463?usp=email )
Change subject: fix up missing requirements
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
the general idea was to *not* include all of osmo-smdpp's dependencies in pysim, as 99.9% of all uses just want pySim-{shell,trace,prog} and not any esim related stuff.
Some of the more modern python packaging supports optional/conditional dependenices, AFAICT.
The proper solution is to move osmo-smdpp to a seaparate git repo (+ python package), depending on the pySim.esim library code.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40463?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: If69b2bd5f8bc604443108c942c17eba9c22f4053
Gerrit-Change-Number: 40463
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Jun 2025 20:15:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40469?usp=email )
Change subject: smdpp: verify cert chain
......................................................................
smdpp: verify cert chain
Change-Id: I1e4e4b1b032dc6a8b7d15bd80d533a50fe0cff15
---
M osmo-smdpp.py
1 file changed, 20 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/69/40469/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index b8b6303..290f77c 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -311,6 +311,20 @@
return cert
return None
+ def validate_certificate_chain_for_verification(self, euicc_ci_pkid_list: List[bytes]) -> bool:
+ """Validate that SM-DP+ has valid certificate chains for the given CI PKIDs."""
+ for ci_pkid in euicc_ci_pkid_list:
+ ci_cert = self.ci_get_cert_for_pkid(ci_pkid)
+ if ci_cert:
+ # Check if our DPauth certificate chains to this CI
+ try:
+ cs = CertificateSet(ci_cert)
+ cs.verify_cert_chain(self.dp_auth.cert)
+ return True
+ except VerifyError:
+ continue
+ return False
+
def __init__(self, server_hostname: str, ci_certs_path: str, common_cert_path: str, use_brainpool: bool = False):
self.server_hostname = server_hostname
self.upp_dir = os.path.realpath(os.path.join(DATA_DIR, 'upp'))
@@ -394,6 +408,12 @@
pkid_list = euiccInfo1['euiccCiPKIdListForSigning']
if 'euiccCiPKIdListForSigningV3' in euiccInfo1:
pkid_list = pkid_list + euiccInfo1['euiccCiPKIdListForSigningV3']
+
+ # Validate that SM-DP+ supports certificate chains for verification
+ verification_pkid_list = euiccInfo1.get('euiccCiPKIdListForVerification', [])
+ if verification_pkid_list and not self.validate_certificate_chain_for_verification(verification_pkid_list):
+ raise ApiError('8.8.4', '3.7', 'The SM-DP+ has no CERT.DPauth.SIG which chains to one of the eSIM CA Root CA Certificate with a Public Key supported by the eUICC')
+
# verify it supports one of the keys indicated by euiccCiPKIdListForSigning
ci_cert = None
for x in pkid_list:
@@ -408,13 +428,6 @@
if not ci_cert:
raise ApiError('8.8.2', '3.1', 'None of the proposed Public Key Identifiers is supported by the SM-DP+')
- # TODO: Determine the set of CERT.DPauth.SIG that satisfy the following criteria:
- # * Part of a certificate chain ending at one of the eSIM CA RootCA Certificate, whose Public Keys is
- # supported by the eUICC (indicated by euiccCiPKIdListForVerification).
- # * Using a certificate chain that the eUICC and the LPA both support:
- #euiccInfo1['euiccCiPKIdListForVerification']
- # raise ApiError('8.8.4', '3.7', 'The SM-DP+ has no CERT.DPauth.SIG which chains to one of the eSIM CA Root CA CErtificate with a Public Key supported by the eUICC')
-
# Generate a TransactionID which is used to identify the ongoing RSP session. The TransactionID
# SHALL be unique within the scope and lifetime of each SM-DP+.
transactionId = uuid.uuid4().hex.upper()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40469?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: I1e4e4b1b032dc6a8b7d15bd80d533a50fe0cff15
Gerrit-Change-Number: 40469
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>