fixed handeling of extended length Le in SM APDU

This commit is contained in:
Frank Morgner
2012-08-31 17:58:53 +02:00
parent 244c3b0583
commit dfbb6480da

View File

@@ -395,6 +395,10 @@ class Security_Environment(object):
# FIXME
#if expected != "":
#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))
return c