sc_check_sw3
Check return status from a card transaction
Usage
#include <opensc.h> int sc_check_sw(struct sc_card *card, int sw1, int sw2);
Overview
This function checks the return status as given in sw1 and sw2 against the card-specific errors of card. These are set by sc_transmit_apdu() in the apdu.sw1 and apdu.sw2 fields, respectively.
The function should be called after every APDU transmission, to convert the card´s status code to an OpenSC error code.
Return value
Returns 0 if successful, or a negative value in case of error.
Releases
3 releases since Debian 4.0 (Etch); the text changed 2 times.