1asn1_der_decoding_startEnd(3) libtasn1 asn1_der_decoding_startEnd(3)
2
3
4
6 asn1_der_decoding_startEnd - Find the start and end point of an element
7 in a DER encoding string.
8
10 #include <libtasn1.h>
11
12 asn1_retCode asn1_der_decoding_startEnd(ASN1_TYPE element, const void *
13 ider, int len, const char * name_element, int * start, int * end);
14
16 ASN1_TYPE element
17 pointer to an ASN1 element
18
19 const void * ider
20 vector that contains the DER encoding.
21
22 int len number of bytes of *ider: ider[0]..ider[len-1]
23
24 const char * name_element
25 an element of NAME structure.
26
27 int * start the position of the first byte of NAME_ELEMENT decoding
28 (ider[*start])
29
30 int * end the position of the last byte of NAME_ELEMENT decoding
31 (ider[*end])
32
34 Find the start and end point of an element in a DER encoding string. I
35 mean that if you have a der encoding and you have already used the
36 function "asn1_der_decoding" to fill a structure, it may happen that
37 you want to find the piece of string concerning an element of the
38 structure.
39
41 the sequence "tbsCertificate" inside an X509 certificate.
42
45 DER encoding OK.
46
48 ELEMENT is ASN1_TYPE EMPTY or NAME_ELEMENT is not a valid element.
49
50 ASN1_TAG_ERROR,ASN1_DER_ERROR: the der encoding doesn't match the
51 structure ELEMENT.
52
54 Copyright © 2006, 2007, 2008, 2009 Free Software Foundation, Inc..
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved.
58
60 The full documentation for libtasn1 is maintained as a Texinfo manual.
61 If the info and libtasn1 programs are properly installed at your site,
62 the command
63
64 info libtasn1
65
66 should give you access to the complete manual.
67
68
69
70libtasn1 2.3 asn1_der_decoding_startEnd(3)