1SC_ASN1_PUT_TAG(3) OpenSC API reference SC_ASN1_PUT_TAG(3)
2
3
4
6 sc_asn1_put_tag - Construct an ASN.1 entry in a buffer
7
9 #include <opensc.h>
10
11 int sc_asn1_put_tag(int tag, const unsigned char *data, int datalen,
12 unsigned char *out, int outlen, unsigned char **nextbuf);
13
14
15
17 This function constructs a single entry in an ASN.1 stream, at the
18 buffer pointed to by out (which is outlen bytes long). The tag to be
19 used is in tag, and the entry payload is pointed to by data, which is
20 datalen bytes long.
21
22 If nextbuf is not NULL, it will be filled in with a pointer to the
23 buffer address immediately following the newly copied entry.
24
26 Returns 0 if successful, or a negative value in case of error.
27
28
29
30opensc 05/04/2007 SC_ASN1_PUT_TAG(3)