[S] Change in pysim[master]: osmo-smdpp: Make error message more descriptive
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/36955?usp=email ) Change subject: osmo-smdpp: Make error message more descriptive ...................................................................... osmo-smdpp: Make error message more descriptive Before this patch we had three different error causes that would cause a "Verification failed" error message. Let's state explicitly which part of verification did actually fail. Change-Id: I5030758fe365bb802ae367b494aace5a66bc7a91 --- M osmo-smdpp.py 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmo-smdpp.py b/osmo-smdpp.py index 9ed1e39..d7fc872 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -325,14 +325,14 @@ try: cs.verify_cert_chain(euicc_cert) except VerifyError: - raise ApiError('8.1.3', '6.1', 'Verification failed') + raise ApiError('8.1.3', '6.1', 'Verification failed (certificate chain)') # raise ApiError('8.1.3', '6.3', 'Expired') # Verify euiccSignature1 over euiccSigned1 using pubkey from euiccCertificate. # Otherwise, the SM-DP+ SHALL return a status code "eUICC - Verification failed" if not self._ecdsa_verify(euicc_cert, euiccSignature1_bin, euiccSigned1_bin): - raise ApiError('8.1', '6.1', 'Verification failed') + raise ApiError('8.1', '6.1', 'Verification failed (euiccSignature1 over euiccSigned1)') # TODO: verify EID of eUICC cert is within permitted range of EUM cert @@ -343,7 +343,7 @@ # serverChallenge returned by the eUICC. Otherwise, the SM-DP+ SHALL return a status code "eUICC - # Verification failed". if euiccSigned1['serverChallenge'] != ss.serverChallenge: - raise ApiError('8.1', '6.1', 'Verification failed') + raise ApiError('8.1', '6.1', 'Verification failed (serverChallenge)') # If ctxParams1 contains a ctxParamsForCommonAuthentication data object, the SM-DP+ Shall [...] # TODO: We really do a very simplistic job here, this needs to be properly implemented later, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/36955?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5030758fe365bb802ae367b494aace5a66bc7a91 Gerrit-Change-Number: 36955 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (1)
-
laforge