sc_send_apdu()

Send a custom Application Protocol Data Unit (APDU) command to a card.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_send_apdu(sc_context_t *context,                 
                                const unsigned char *request_apdu,                 
                                size_t request_apdu_length,                 
                                unsigned char *response_apdu,                 
                                size_t *response_apdu_length)

Since:

BlackBerry 10.2.0

Arguments:

context

The active smart card context. This value cannot be NULL.

request_apdu

The raw request APDU. This value cannot be NULL.

request_apdu_length

The length of the request APDU byte array.

response_apdu

The raw response APDU. If NULL, only the length of the response APDU is returned.

response_apdu_length

The length of the response APDU. This value cannot be NULL.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

Before calling this function, you must call sc_context_create_extended() to create a context.

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.