Fix secure channel with no payload.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-10-30 21:10:15 +01:00
parent 4a8a6728c7
commit b2c2980d73
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -106,8 +106,10 @@ int sm_unwrap() {
}
}
}
if (!body)
return CCID_WRONG_DATA;
if (!body) {
apdu.nc = 0;
return CCID_OK;
}
if (is87 && *body++ != 0x1) {
return CCID_WRONG_PADDING;
}