sc_get_data(3) 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 from card. It corresponds to the GET DATA command in the ISO 7816 standard. The data is stored in buf, 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.