File: sc_asn1_read_tag.3

package info (click to toggle)
opensc 0.11.1-2etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,284 kB
  • ctags: 7,257
  • sloc: ansic: 69,499; sh: 9,480; xml: 4,191; makefile: 346; lex: 92; perl: 25
file content (47 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SC_ASN1_READ_TAG" 3 "" "" "OpenSC API Reference"
.SH NAME
sc_asn1_read_tag \- Extract a tag from an ASN.1 entry
.SH "SYNOPSIS"

.PP


.nf

#include <opensc\&.h>

int sc_asn1_read_tag(const unsigned char **buf, size_t buflen,
                     unsigned int *cla_out, unsigned int *tag_out, size_t *taglen);
		
.fi
 

.SH "DESCRIPTION"

.PP
This function extracts a tag from an ASN\&.1 entry at the buffer pointed to by the pointer in \fIbuf\fR\&. The buffer is \fIbuflen\fR bytes long\&. The tag class will be stored in \fIcla_out\fR, the tag itself in\fItag_out\fR, and the length of the extracted tag in\fItag_len\fR\&.

.SH "RETURN VALUE"

.PP
Returns 1 if successful, or \-1 in case of error\&.