Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Support for Portuguese Electronic ID Cards #208

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Updated SEutils to match the ConstantDefinitions
  • Loading branch information
jpbarraca committed Dec 6, 2021
commit 0065c16a8288c90cb38cdeee36e5a2798f3f60dd
4 changes: 2 additions & 2 deletions virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def __set_algo(self, data):
:param data: reference to an algorithm
"""

if data[0] not in ALGO_MAPPING:
if data not in ALGO_MAPPING:
raise SwError(SW["ERR_REFNOTUSABLE"])
else:
self.algorithm = ALGO_MAPPING[data[0]]
self.algorithm = ALGO_MAPPING[data]
self.__replace_tag(0x80, data)

def __set_key(self, tag, value):
Expand Down