fixed handeling of extended length Le in SM APDU
This commit is contained in:
@@ -395,6 +395,10 @@ class Security_Environment(object):
|
|||||||
# FIXME
|
# FIXME
|
||||||
#if expected != "":
|
#if expected != "":
|
||||||
#raise SwError(SW["ERR_SECMESSOBJECTSMISSING"])
|
#raise SwError(SW["ERR_SECMESSOBJECTSMISSING"])
|
||||||
|
|
||||||
|
if isinstance(le, str):
|
||||||
|
# FIXME C_APDU only handles le with strings of length 1. Better patch utils.py to support extended length apdus
|
||||||
|
le = stringtoint(le)
|
||||||
|
|
||||||
c = C_APDU(cla=cla, ins=ins, p1=p1, p2=p2, le=le, data="".join(return_data))
|
c = C_APDU(cla=cla, ins=ins, p1=p1, p2=p2, le=le, data="".join(return_data))
|
||||||
return c
|
return c
|
||||||
|
|||||||
Reference in New Issue
Block a user