SC_GET_DATA(3)

NAME
sc_get_data - Get a primitive data object from a card

SYNOPSIS

#include <opensc.h>
int sc_get_data(sc_card_t *card, unsigned int tag,
                unsigned char *buf, size_t buflen);

DESCRIPTION

This function is used to retrieve a primitive data object fromcard. It corresponds to the GET DATA command in theISO 7816 standard. The data is stored inbuf, which is buflen bytes long.

The tag parameter specifies the object to be retrieved. Refer to the standard for the correct values to use.

RETURN VALUE

Returns 0 if successful, or a negative value in case of error.