1asn1_encode_simple_der(3) libtasn1 asn1_encode_simple_der(3)
2
3
4
6 asn1_encode_simple_der - API function
7
9 #include <libtasn1.h>
10
11 int asn1_encode_simple_der(unsigned int etype, const unsigned char *
12 str, unsigned int str_len, unsigned char * tl, unsigned int * tl_len);
13
15 unsigned int etype
16 The type of the string to be encoded (ASN1_ETYPE_)
17
18 const unsigned char * str
19 the string data.
20
21 unsigned int str_len
22 the string length
23
24 unsigned char * tl
25 the encoded tag and length
26
27 unsigned int * tl_len
28 the bytes of the tl field
29
31 Creates the DER encoding for various simple ASN.1 types like strings
32 etc. It stores the tag and length in tl , which should have space for
33 at least ASN1_MAX_TL_SIZE bytes. Initially tl_len should contain the
34 size of tl .
35
36 The complete DER encoding should consist of the value in tl appended
37 with the provided str .
38
40 ASN1_SUCCESS if successful or an error value.
41
43 Copyright © 2006-2015 Free Software Foundation, Inc..
44 Copying and distribution of this file, with or without modification,
45 are permitted in any medium without royalty provided the copyright
46 notice and this notice are preserved.
47
49 The full documentation for libtasn1 is maintained as a Texinfo manual.
50 If the info and libtasn1 programs are properly installed at your site,
51 the command
52
53 info libtasn1
54
55 should give you access to the complete manual. As an alternative you
56 may obtain the manual from:
57
58 http://www.gnu.org/software/libtasn1/manual/
59
60libtasn1 4.8 asn1_encode_simple_der(3)