Fix returning chunked data.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-02-03 16:47:46 +01:00
parent cf53fdd903
commit 3fe15c815c
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3

View File

@ -270,8 +270,8 @@ class OpenPGP_Card(object):
raise ValueError(sw)
if sw[0] == 0x61:
return self.cmd_get_response(sw[1])
if (sw[-2] == 0x61):
return self.cmd_get_response(sw[-1])
elif (sw[-2] == 0x61):
return sw + self.cmd_get_response(sw[-1])
elif sw[-2] == 0x90 and sw[-1] == 0x00:
return sw[0:-2]
if sw[0] == 0x6a and sw[1] == 0x88: