fixeria has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/42382?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted
one.
)Change subject: ota: OtaAlgo{Crypt,Auth}: fix algo_auth vs algo_crypt
......................................................................
ota: OtaAlgo{Crypt,Auth}: fix algo_auth vs algo_crypt
* OtaAlgoCrypt.from_keyset() searches by `otak.algo_crypt`
but the error message prints `otak.algo_auth`. Should be
`otak.algo_crypt` instead.
* OtaAlgoAuth.__init__() checks `algo_auth` but the error message
prints `algo_crypt`. Should be `otak.algo_auth` instead.
Change-Id: Ia636fffaeadc68e3f6d5b65d477e753834c95895
---
M pySim/ota.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
daniel: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/pySim/ota.py b/pySim/ota.py
index fbb9d45..3d2da15 100644
--- a/pySim/ota.py
+++ b/pySim/ota.py
@@ -221,12 +221,12 @@
for subc in cls.__subclasses__():
if subc.enum_name == otak.algo_crypt:
return subc(otak)
- raise ValueError('No implementation for crypt algorithm %s' %
otak.algo_auth)
+ raise ValueError('No implementation for crypt algorithm %s' %
otak.algo_crypt)
class OtaAlgoAuth(OtaAlgo, abc.ABC):
def __init__(self, otak: OtaKeyset):
if self.enum_name != otak.algo_auth:
- raise ValueError('Cannot use algorithm %s with key for %s' %
(self.enum_name, otak.algo_crypt))
+ raise ValueError('Cannot use algorithm %s with key for %s' %
(self.enum_name, otak.algo_auth))
super().__init__(otak)
def sign(self, data:bytes) -> bytes:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42382?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: Ia636fffaeadc68e3f6d5b65d477e753834c95895
Gerrit-Change-Number: 42382
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>