1SC_ASN1_READ_TAG(3)          OpenSC API reference          SC_ASN1_READ_TAG(3)
2
3
4

NAME

6       sc_asn1_read_tag - Extract a tag from an ASN.1 entry
7

SYNOPSIS

9          #include <opensc.h>
10
11          int sc_asn1_read_tag(const unsigned char **buf, size_t buflen,
12                               unsigned int *cla_out, unsigned int *tag_out, size_t *taglen);
13
14
15

DESCRIPTION

17       This function extracts a tag from an ASN.1 entry at the buffer pointed
18       to by the pointer in buf. The buffer is buflen bytes long. The tag
19       class will be stored in cla_out, the tag itself in tag_out, and the
20       length of the extracted tag in tag_len.
21

RETURN VALUE

23       Returns 1 if successful, or -1 in case of error.
24
25
26
27opensc                            05/04/2007               SC_ASN1_READ_TAG(3)
Impressum