~ubuntu-branches/ubuntu/maverick/gnutls26/maverick-updates

« back to all changes in this revision

Viewing changes to doc/reference/html/gnutls-libtasn1.html

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2010-03-20 15:53:35 UTC
  • mfrom: (1.2.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100320155335-9lxxf3r7ildrqs1v
Tags: upstream-2.8.6
Import upstream version 2.8.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch01.html" title="GNU TLS API Reference Manual">
9
9
<link rel="prev" href="gnutls-openssl.html" title="openssl">
10
10
<link rel="next" href="ix01.html" title="Index">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="chapter" href="ch01.html" title="GNU TLS API Reference Manual">
14
 
<link rel="index" href="ix01.html" title="Index">
15
 
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
16
 
<link rel="index" href="ix03.html" title="Index of new symbols in 2.4.0">
17
 
<link rel="index" href="ix04.html" title="Index of new symbols in 2.6.0">
18
 
<link rel="index" href="ix05.html" title="Index of new symbols in 2.8.0">
19
13
</head>
20
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
21
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
28
22
</tr>
29
23
<tr><td colspan="5" class="shortcuts">
30
24
<a href="#gnutls-libtasn1.synopsis" class="shortcut">Top</a>
31
 
                 | 
32
 
                <a href="#gnutls-libtasn1.description" class="shortcut">Description</a>
 
25
                   | 
 
26
                  <a href="#gnutls-libtasn1.description" class="shortcut">Description</a>
33
27
</td></tr>
34
28
</table>
35
29
<div class="refentry" title="libtasn1">
43
37
</tr></table></div>
44
38
<div class="refsynopsisdiv" title="Synopsis">
45
39
<a name="gnutls-libtasn1.synopsis"></a><h2>Synopsis</h2>
46
 
<pre class="synopsis">
47
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-API--CAPS" title="ASN1_API">ASN1_API</a>
48
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VERSION--CAPS" title="ASN1_VERSION">ASN1_VERSION</a>
 
40
<pre class="synopsis">#define             <a class="link" href="gnutls-libtasn1.html#ASN1-API:CAPS" title="ASN1_API">ASN1_API</a>
 
41
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VERSION:CAPS" title="ASN1_VERSION">ASN1_VERSION</a>
49
42
typedef             <a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>;
50
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-SUCCESS--CAPS" title="ASN1_SUCCESS">ASN1_SUCCESS</a>
51
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-FILE-NOT-FOUND--CAPS" title="ASN1_FILE_NOT_FOUND">ASN1_FILE_NOT_FOUND</a>
52
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ELEMENT-NOT-FOUND--CAPS" title="ASN1_ELEMENT_NOT_FOUND">ASN1_ELEMENT_NOT_FOUND</a>
53
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-IDENTIFIER-NOT-FOUND--CAPS" title="ASN1_IDENTIFIER_NOT_FOUND">ASN1_IDENTIFIER_NOT_FOUND</a>
54
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-DER-ERROR--CAPS" title="ASN1_DER_ERROR">ASN1_DER_ERROR</a>
55
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VALUE-NOT-FOUND--CAPS" title="ASN1_VALUE_NOT_FOUND">ASN1_VALUE_NOT_FOUND</a>
56
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-GENERIC-ERROR--CAPS" title="ASN1_GENERIC_ERROR">ASN1_GENERIC_ERROR</a>
57
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VALUE-NOT-VALID--CAPS" title="ASN1_VALUE_NOT_VALID">ASN1_VALUE_NOT_VALID</a>
58
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-ERROR--CAPS" title="ASN1_TAG_ERROR">ASN1_TAG_ERROR</a>
59
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-IMPLICIT--CAPS" title="ASN1_TAG_IMPLICIT">ASN1_TAG_IMPLICIT</a>
60
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ERROR-TYPE-ANY--CAPS" title="ASN1_ERROR_TYPE_ANY">ASN1_ERROR_TYPE_ANY</a>
61
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-SYNTAX-ERROR--CAPS" title="ASN1_SYNTAX_ERROR">ASN1_SYNTAX_ERROR</a>
62
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MEM-ERROR--CAPS" title="ASN1_MEM_ERROR">ASN1_MEM_ERROR</a>
63
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MEM-ALLOC-ERROR--CAPS" title="ASN1_MEM_ALLOC_ERROR">ASN1_MEM_ALLOC_ERROR</a>
64
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-DER-OVERFLOW--CAPS" title="ASN1_DER_OVERFLOW">ASN1_DER_OVERFLOW</a>
65
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-NAME-TOO-LONG--CAPS" title="ASN1_NAME_TOO_LONG">ASN1_NAME_TOO_LONG</a>
66
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-ERROR--CAPS" title="ASN1_ARRAY_ERROR">ASN1_ARRAY_ERROR</a>
67
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ELEMENT-NOT-EMPTY--CAPS" title="ASN1_ELEMENT_NOT_EMPTY">ASN1_ELEMENT_NOT_EMPTY</a>
68
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME--CAPS" title="ASN1_PRINT_NAME">ASN1_PRINT_NAME</a>
69
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE--CAPS" title="ASN1_PRINT_NAME_TYPE">ASN1_PRINT_NAME_TYPE</a>
70
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE-VALUE--CAPS" title="ASN1_PRINT_NAME_TYPE_VALUE">ASN1_PRINT_NAME_TYPE_VALUE</a>
71
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-ALL--CAPS" title="ASN1_PRINT_ALL">ASN1_PRINT_ALL</a>
72
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-UNIVERSAL--CAPS" title="ASN1_CLASS_UNIVERSAL">ASN1_CLASS_UNIVERSAL</a>
73
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-APPLICATION--CAPS" title="ASN1_CLASS_APPLICATION">ASN1_CLASS_APPLICATION</a>
74
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-CONTEXT-SPECIFIC--CAPS" title="ASN1_CLASS_CONTEXT_SPECIFIC">ASN1_CLASS_CONTEXT_SPECIFIC</a>
75
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-PRIVATE--CAPS" title="ASN1_CLASS_PRIVATE">ASN1_CLASS_PRIVATE</a>
76
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-STRUCTURED--CAPS" title="ASN1_CLASS_STRUCTURED">ASN1_CLASS_STRUCTURED</a>
77
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-BOOLEAN--CAPS" title="ASN1_TAG_BOOLEAN">ASN1_TAG_BOOLEAN</a>
78
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-INTEGER--CAPS" title="ASN1_TAG_INTEGER">ASN1_TAG_INTEGER</a>
79
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-SEQUENCE--CAPS" title="ASN1_TAG_SEQUENCE">ASN1_TAG_SEQUENCE</a>
80
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-SET--CAPS" title="ASN1_TAG_SET">ASN1_TAG_SET</a>
81
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-OCTET-STRING--CAPS" title="ASN1_TAG_OCTET_STRING">ASN1_TAG_OCTET_STRING</a>
82
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-BIT-STRING--CAPS" title="ASN1_TAG_BIT_STRING">ASN1_TAG_BIT_STRING</a>
 
43
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-SUCCESS:CAPS" title="ASN1_SUCCESS">ASN1_SUCCESS</a>
 
44
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-FILE-NOT-FOUND:CAPS" title="ASN1_FILE_NOT_FOUND">ASN1_FILE_NOT_FOUND</a>
 
45
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ELEMENT-NOT-FOUND:CAPS" title="ASN1_ELEMENT_NOT_FOUND">ASN1_ELEMENT_NOT_FOUND</a>
 
46
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-IDENTIFIER-NOT-FOUND:CAPS" title="ASN1_IDENTIFIER_NOT_FOUND">ASN1_IDENTIFIER_NOT_FOUND</a>
 
47
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-DER-ERROR:CAPS" title="ASN1_DER_ERROR">ASN1_DER_ERROR</a>
 
48
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VALUE-NOT-FOUND:CAPS" title="ASN1_VALUE_NOT_FOUND">ASN1_VALUE_NOT_FOUND</a>
 
49
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-GENERIC-ERROR:CAPS" title="ASN1_GENERIC_ERROR">ASN1_GENERIC_ERROR</a>
 
50
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-VALUE-NOT-VALID:CAPS" title="ASN1_VALUE_NOT_VALID">ASN1_VALUE_NOT_VALID</a>
 
51
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-ERROR:CAPS" title="ASN1_TAG_ERROR">ASN1_TAG_ERROR</a>
 
52
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-IMPLICIT:CAPS" title="ASN1_TAG_IMPLICIT">ASN1_TAG_IMPLICIT</a>
 
53
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ERROR-TYPE-ANY:CAPS" title="ASN1_ERROR_TYPE_ANY">ASN1_ERROR_TYPE_ANY</a>
 
54
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-SYNTAX-ERROR:CAPS" title="ASN1_SYNTAX_ERROR">ASN1_SYNTAX_ERROR</a>
 
55
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MEM-ERROR:CAPS" title="ASN1_MEM_ERROR">ASN1_MEM_ERROR</a>
 
56
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MEM-ALLOC-ERROR:CAPS" title="ASN1_MEM_ALLOC_ERROR">ASN1_MEM_ALLOC_ERROR</a>
 
57
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-DER-OVERFLOW:CAPS" title="ASN1_DER_OVERFLOW">ASN1_DER_OVERFLOW</a>
 
58
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-NAME-TOO-LONG:CAPS" title="ASN1_NAME_TOO_LONG">ASN1_NAME_TOO_LONG</a>
 
59
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-ERROR:CAPS" title="ASN1_ARRAY_ERROR">ASN1_ARRAY_ERROR</a>
 
60
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-ELEMENT-NOT-EMPTY:CAPS" title="ASN1_ELEMENT_NOT_EMPTY">ASN1_ELEMENT_NOT_EMPTY</a>
 
61
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME:CAPS" title="ASN1_PRINT_NAME">ASN1_PRINT_NAME</a>
 
62
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE:CAPS" title="ASN1_PRINT_NAME_TYPE">ASN1_PRINT_NAME_TYPE</a>
 
63
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE-VALUE:CAPS" title="ASN1_PRINT_NAME_TYPE_VALUE">ASN1_PRINT_NAME_TYPE_VALUE</a>
 
64
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-ALL:CAPS" title="ASN1_PRINT_ALL">ASN1_PRINT_ALL</a>
 
65
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-UNIVERSAL:CAPS" title="ASN1_CLASS_UNIVERSAL">ASN1_CLASS_UNIVERSAL</a>
 
66
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-APPLICATION:CAPS" title="ASN1_CLASS_APPLICATION">ASN1_CLASS_APPLICATION</a>
 
67
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-CONTEXT-SPECIFIC:CAPS" title="ASN1_CLASS_CONTEXT_SPECIFIC">ASN1_CLASS_CONTEXT_SPECIFIC</a>
 
68
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-PRIVATE:CAPS" title="ASN1_CLASS_PRIVATE">ASN1_CLASS_PRIVATE</a>
 
69
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-STRUCTURED:CAPS" title="ASN1_CLASS_STRUCTURED">ASN1_CLASS_STRUCTURED</a>
 
70
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-BOOLEAN:CAPS" title="ASN1_TAG_BOOLEAN">ASN1_TAG_BOOLEAN</a>
 
71
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-INTEGER:CAPS" title="ASN1_TAG_INTEGER">ASN1_TAG_INTEGER</a>
 
72
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-SEQUENCE:CAPS" title="ASN1_TAG_SEQUENCE">ASN1_TAG_SEQUENCE</a>
 
73
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-SET:CAPS" title="ASN1_TAG_SET">ASN1_TAG_SET</a>
 
74
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-OCTET-STRING:CAPS" title="ASN1_TAG_OCTET_STRING">ASN1_TAG_OCTET_STRING</a>
 
75
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-BIT-STRING:CAPS" title="ASN1_TAG_BIT_STRING">ASN1_TAG_BIT_STRING</a>
83
76
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-UTCTime" title="ASN1_TAG_UTCTime">ASN1_TAG_UTCTime</a>
84
77
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-GENERALIZEDTime" title="ASN1_TAG_GENERALIZEDTime">ASN1_TAG_GENERALIZEDTime</a>
85
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-OBJECT-ID--CAPS" title="ASN1_TAG_OBJECT_ID">ASN1_TAG_OBJECT_ID</a>
86
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-ENUMERATED--CAPS" title="ASN1_TAG_ENUMERATED">ASN1_TAG_ENUMERATED</a>
87
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-NULL--CAPS" title="ASN1_TAG_NULL">ASN1_TAG_NULL</a>
88
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-GENERALSTRING--CAPS" title="ASN1_TAG_GENERALSTRING">ASN1_TAG_GENERALSTRING</a>
 
78
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-OBJECT-ID:CAPS" title="ASN1_TAG_OBJECT_ID">ASN1_TAG_OBJECT_ID</a>
 
79
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-ENUMERATED:CAPS" title="ASN1_TAG_ENUMERATED">ASN1_TAG_ENUMERATED</a>
 
80
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-NULL:CAPS" title="ASN1_TAG_NULL">ASN1_TAG_NULL</a>
 
81
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TAG-GENERALSTRING:CAPS" title="ASN1_TAG_GENERALSTRING">ASN1_TAG_GENERALSTRING</a>
89
82
typedef             <a class="link" href="gnutls-libtasn1.html#node-asn" title="node_asn">node_asn</a>;
90
 
typedef             <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a>;
91
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE-EMPTY--CAPS" title="ASN1_TYPE_EMPTY">ASN1_TYPE_EMPTY</a>
92
 
typedef             <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE--CAPS" title="ASN1_ARRAY_TYPE">ASN1_ARRAY_TYPE</a>;
93
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MAX-NAME-SIZE--CAPS" title="ASN1_MAX_NAME_SIZE">ASN1_MAX_NAME_SIZE</a>
94
 
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MAX-ERROR-DESCRIPTION-SIZE--CAPS" title="ASN1_MAX_ERROR_DESCRIPTION_SIZE">ASN1_MAX_ERROR_DESCRIPTION_SIZE</a>
95
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-parser2tree" title="asn1_parser2tree ()">asn1_parser2tree</a>                    (const char *file_name,
96
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *definitions,
97
 
                                                         char *errorDescription);
98
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-parser2array" title="asn1_parser2array ()">asn1_parser2array</a>                   (const char *inputFileName,
99
 
                                                         const char *outputFileName,
100
 
                                                         const char *vectorName,
101
 
                                                         char *errorDescription);
102
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-array2tree" title="asn1_array2tree ()">asn1_array2tree</a>                     (const <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE--CAPS" title="ASN1_ARRAY_TYPE">ASN1_ARRAY_TYPE</a> *array,
103
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *definitions,
104
 
                                                         char *errorDescription);
105
 
void                <a class="link" href="gnutls-libtasn1.html#asn1-print-structure" title="asn1_print_structure ()">asn1_print_structure</a>                (FILE *out,
106
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> structure,
107
 
                                                         const char *name,
108
 
                                                         int mode);
109
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-create-element" title="asn1_create_element ()">asn1_create_element</a>                 (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
110
 
                                                         const char *source_name,
111
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element);
112
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-delete-structure" title="asn1_delete_structure ()">asn1_delete_structure</a>               (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *structure);
113
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-delete-element" title="asn1_delete_element ()">asn1_delete_element</a>                 (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> structure,
114
 
                                                         const char *element_name);
115
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-write-value" title="asn1_write_value ()">asn1_write_value</a>                    (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> node_root,
116
 
                                                         const char *name,
117
 
                                                         const void *ivalue,
118
 
                                                         int len);
119
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-read-value" title="asn1_read_value ()">asn1_read_value</a>                     (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> root,
120
 
                                                         const char *name,
121
 
                                                         void *ivalue,
122
 
                                                         int *len);
123
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-number-of-elements" title="asn1_number_of_elements ()">asn1_number_of_elements</a>             (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
124
 
                                                         const char *name,
125
 
                                                         int *num);
126
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-coding" title="asn1_der_coding ()">asn1_der_coding</a>                     (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
127
 
                                                         const char *name,
128
 
                                                         void *ider,
129
 
                                                         int *len,
130
 
                                                         char *ErrorDescription);
131
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding" title="asn1_der_decoding ()">asn1_der_decoding</a>                   (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element,
132
 
                                                         const void *ider,
133
 
                                                         int len,
134
 
                                                         char *errorDescription);
135
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding-element" title="asn1_der_decoding_element ()">asn1_der_decoding_element</a>           (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *structure,
136
 
                                                         const char *elementName,
137
 
                                                         const void *ider,
138
 
                                                         int len,
139
 
                                                         char *errorDescription);
140
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding-startEnd" title="asn1_der_decoding_startEnd ()">asn1_der_decoding_startEnd</a>          (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
141
 
                                                         const void *ider,
142
 
                                                         int len,
143
 
                                                         const char *name_element,
144
 
                                                         int *start,
145
 
                                                         int *end);
146
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-expand-any-defined-by" title="asn1_expand_any_defined_by ()">asn1_expand_any_defined_by</a>          (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
147
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element);
148
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-expand-octet-string" title="asn1_expand_octet_string ()">asn1_expand_octet_string</a>            (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
149
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element,
150
 
                                                         const char *octetName,
151
 
                                                         const char *objectName);
152
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-read-tag" title="asn1_read_tag ()">asn1_read_tag</a>                       (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> root,
153
 
                                                         const char *name,
154
 
                                                         int *tagValue,
155
 
                                                         int *classValue);
156
 
const char *        <a class="link" href="gnutls-libtasn1.html#asn1-find-structure-from-oid" title="asn1_find_structure_from_oid ()">asn1_find_structure_from_oid</a>        (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
157
 
                                                         const char *oidValue);
158
 
const char *        <a class="link" href="gnutls-libtasn1.html#asn1-check-version" title="asn1_check_version ()">asn1_check_version</a>                  (const char *req_version);
159
 
const char *        <a class="link" href="gnutls-libtasn1.html#asn1-strerror" title="asn1_strerror ()">asn1_strerror</a>                       (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);
160
 
void                <a class="link" href="gnutls-libtasn1.html#asn1-perror" title="asn1_perror ()">asn1_perror</a>                         (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);
161
 
int                 <a class="link" href="gnutls-libtasn1.html#asn1-get-tag-der" title="asn1_get_tag_der ()">asn1_get_tag_der</a>                    (unsigned char *der,
162
 
                                                         int der_len,
163
 
                                                         unsigned char *cls,
164
 
                                                         int *len,
165
 
                                                         unsigned long *tag);
166
 
void                <a class="link" href="gnutls-libtasn1.html#asn1-octet-der" title="asn1_octet_der ()">asn1_octet_der</a>                      (unsigned char *str,
167
 
                                                         int str_len,
168
 
                                                         unsigned char *der,
169
 
                                                         int *der_len);
170
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-get-octet-der" title="asn1_get_octet_der ()">asn1_get_octet_der</a>                  (unsigned char *der,
171
 
                                                         int der_len,
172
 
                                                         int *ret_len,
173
 
                                                         unsigned char *str,
174
 
                                                         int str_size,
175
 
                                                         int *str_len);
176
 
void                <a class="link" href="gnutls-libtasn1.html#asn1-bit-der" title="asn1_bit_der ()">asn1_bit_der</a>                        (unsigned char *str,
177
 
                                                         int bit_len,
178
 
                                                         unsigned char *der,
179
 
                                                         int *der_len);
180
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-get-bit-der" title="asn1_get_bit_der ()">asn1_get_bit_der</a>                    (unsigned char *der,
181
 
                                                         int der_len,
182
 
                                                         int *ret_len,
183
 
                                                         unsigned char *str,
184
 
                                                         int str_size,
185
 
                                                         int *bit_len);
186
 
void                <a class="link" href="gnutls-libtasn1.html#asn1-length-der" title="asn1_length_der ()">asn1_length_der</a>                     (unsigned long int len,
187
 
                                                         unsigned char *ans,
188
 
                                                         int *ans_len);
189
 
<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a>           <a class="link" href="gnutls-libtasn1.html#asn1-find-node" title="asn1_find_node ()">asn1_find_node</a>                      (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> pointer,
190
 
                                                         const char *name);
191
 
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        <a class="link" href="gnutls-libtasn1.html#asn1-copy-node" title="asn1_copy_node ()">asn1_copy_node</a>                      (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> dst,
192
 
                                                         const char *dst_name,
193
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> src,
194
 
                                                         const char *src_name);
195
 
#define             <a class="link" href="gnutls-libtasn1.html#LIBTASN1-VERSION--CAPS" title="LIBTASN1_VERSION">LIBTASN1_VERSION</a>
196
 
#define             <a class="link" href="gnutls-libtasn1.html#MAX-NAME-SIZE--CAPS" title="MAX_NAME_SIZE">MAX_NAME_SIZE</a>
197
 
#define             <a class="link" href="gnutls-libtasn1.html#MAX-ERROR-DESCRIPTION-SIZE--CAPS" title="MAX_ERROR_DESCRIPTION_SIZE">MAX_ERROR_DESCRIPTION_SIZE</a>
198
 
const char *        <a class="link" href="gnutls-libtasn1.html#libtasn1-strerror" title="libtasn1_strerror ()">libtasn1_strerror</a>                   (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);
199
 
void                <a class="link" href="gnutls-libtasn1.html#libtasn1-perror" title="libtasn1_perror ()">libtasn1_perror</a>                     (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);
 
83
typedef             <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE">ASN1_TYPE</a>;
 
84
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE-EMPTY:CAPS" title="ASN1_TYPE_EMPTY">ASN1_TYPE_EMPTY</a>
 
85
typedef             <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE:CAPS" title="ASN1_ARRAY_TYPE">ASN1_ARRAY_TYPE</a>;
 
86
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MAX-NAME-SIZE:CAPS" title="ASN1_MAX_NAME_SIZE">ASN1_MAX_NAME_SIZE</a>
 
87
#define             <a class="link" href="gnutls-libtasn1.html#ASN1-MAX-ERROR-DESCRIPTION-SIZE:CAPS" title="ASN1_MAX_ERROR_DESCRIPTION_SIZE">ASN1_MAX_ERROR_DESCRIPTION_SIZE</a>
 
88
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-parser2tree" title="asn1_parser2tree ()">asn1_parser2tree</a>                    (<em class="parameter"><code>const <span class="type">char</span> *file_name</code></em>,
 
89
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *definitions</code></em>,
 
90
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);
 
91
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-parser2array" title="asn1_parser2array ()">asn1_parser2array</a>                   (<em class="parameter"><code>const <span class="type">char</span> *inputFileName</code></em>,
 
92
                                                         <em class="parameter"><code>const <span class="type">char</span> *outputFileName</code></em>,
 
93
                                                         <em class="parameter"><code>const <span class="type">char</span> *vectorName</code></em>,
 
94
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);
 
95
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-array2tree" title="asn1_array2tree ()">asn1_array2tree</a>                     (<em class="parameter"><code>const <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE:CAPS" title="ASN1_ARRAY_TYPE"><span class="type">ASN1_ARRAY_TYPE</span></a> *array</code></em>,
 
96
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *definitions</code></em>,
 
97
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);
 
98
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#asn1-print-structure" title="asn1_print_structure ()">asn1_print_structure</a>                (<em class="parameter"><code><span class="type">FILE</span> *out</code></em>,
 
99
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> structure</code></em>,
 
100
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
101
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> mode</code></em>);
 
102
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-create-element" title="asn1_create_element ()">asn1_create_element</a>                 (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
103
                                                         <em class="parameter"><code>const <span class="type">char</span> *source_name</code></em>,
 
104
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>);
 
105
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-delete-structure" title="asn1_delete_structure ()">asn1_delete_structure</a>               (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *structure</code></em>);
 
106
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-delete-element" title="asn1_delete_element ()">asn1_delete_element</a>                 (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> structure</code></em>,
 
107
                                                         <em class="parameter"><code>const <span class="type">char</span> *element_name</code></em>);
 
108
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-write-value" title="asn1_write_value ()">asn1_write_value</a>                    (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> node_root</code></em>,
 
109
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
110
                                                         <em class="parameter"><code>const <span class="type">void</span> *ivalue</code></em>,
 
111
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>);
 
112
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-read-value" title="asn1_read_value ()">asn1_read_value</a>                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> root</code></em>,
 
113
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
114
                                                         <em class="parameter"><code><span class="type">void</span> *ivalue</code></em>,
 
115
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);
 
116
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-number-of-elements" title="asn1_number_of_elements ()">asn1_number_of_elements</a>             (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
117
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
118
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *num</code></em>);
 
119
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-coding" title="asn1_der_coding ()">asn1_der_coding</a>                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
120
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
121
                                                         <em class="parameter"><code><span class="type">void</span> *ider</code></em>,
 
122
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>,
 
123
                                                         <em class="parameter"><code><span class="type">char</span> *ErrorDescription</code></em>);
 
124
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding" title="asn1_der_decoding ()">asn1_der_decoding</a>                   (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>,
 
125
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
126
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
127
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);
 
128
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding-element" title="asn1_der_decoding_element ()">asn1_der_decoding_element</a>           (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *structure</code></em>,
 
129
                                                         <em class="parameter"><code>const <span class="type">char</span> *elementName</code></em>,
 
130
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
131
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
132
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);
 
133
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-der-decoding-startEnd" title="asn1_der_decoding_startEnd ()">asn1_der_decoding_startEnd</a>          (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
134
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
135
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
136
                                                         <em class="parameter"><code>const <span class="type">char</span> *name_element</code></em>,
 
137
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *start</code></em>,
 
138
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *end</code></em>);
 
139
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-expand-any-defined-by" title="asn1_expand_any_defined_by ()">asn1_expand_any_defined_by</a>          (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
140
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>);
 
141
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-expand-octet-string" title="asn1_expand_octet_string ()">asn1_expand_octet_string</a>            (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
142
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>,
 
143
                                                         <em class="parameter"><code>const <span class="type">char</span> *octetName</code></em>,
 
144
                                                         <em class="parameter"><code>const <span class="type">char</span> *objectName</code></em>);
 
145
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-read-tag" title="asn1_read_tag ()">asn1_read_tag</a>                       (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> root</code></em>,
 
146
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
147
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *tagValue</code></em>,
 
148
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *classValue</code></em>);
 
149
const <span class="returnvalue">char</span> *        <a class="link" href="gnutls-libtasn1.html#asn1-find-structure-from-oid" title="asn1_find_structure_from_oid ()">asn1_find_structure_from_oid</a>        (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
150
                                                         <em class="parameter"><code>const <span class="type">char</span> *oidValue</code></em>);
 
151
const <span class="returnvalue">char</span> *        <a class="link" href="gnutls-libtasn1.html#asn1-check-version" title="asn1_check_version ()">asn1_check_version</a>                  (<em class="parameter"><code>const <span class="type">char</span> *req_version</code></em>);
 
152
const <span class="returnvalue">char</span> *        <a class="link" href="gnutls-libtasn1.html#asn1-strerror" title="asn1_strerror ()">asn1_strerror</a>                       (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);
 
153
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#asn1-perror" title="asn1_perror ()">asn1_perror</a>                         (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);
 
154
<a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="returnvalue">int</span></a>                 <a class="link" href="gnutls-libtasn1.html#asn1-get-tag-der" title="asn1_get_tag_der ()">asn1_get_tag_der</a>                    (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
155
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
156
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *cls</code></em>,
 
157
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>,
 
158
                                                         <em class="parameter"><code>unsigned <span class="type">long</span> *tag</code></em>);
 
159
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#asn1-octet-der" title="asn1_octet_der ()">asn1_octet_der</a>                      (<em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
160
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_len</code></em>,
 
161
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
162
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *der_len</code></em>);
 
163
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-get-octet-der" title="asn1_get_octet_der ()">asn1_get_octet_der</a>                  (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
164
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
165
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ret_len</code></em>,
 
166
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
167
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_size</code></em>,
 
168
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *str_len</code></em>);
 
169
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#asn1-bit-der" title="asn1_bit_der ()">asn1_bit_der</a>                        (<em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
170
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> bit_len</code></em>,
 
171
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
172
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *der_len</code></em>);
 
173
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-get-bit-der" title="asn1_get_bit_der ()">asn1_get_bit_der</a>                    (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
174
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
175
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ret_len</code></em>,
 
176
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
177
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_size</code></em>,
 
178
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *bit_len</code></em>);
 
179
signed <span class="returnvalue">long</span>         <a class="link" href="gnutls-libtasn1.html#asn1-get-length-der" title="asn1_get_length_der ()">asn1_get_length_der</a>                 (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
180
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
181
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);
 
182
signed <span class="returnvalue">long</span>         <a class="link" href="gnutls-libtasn1.html#asn1-get-length-ber" title="asn1_get_length_ber ()">asn1_get_length_ber</a>                 (<em class="parameter"><code>unsigned <span class="type">char</span> *ber</code></em>,
 
183
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> ber_len</code></em>,
 
184
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);
 
185
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#asn1-length-der" title="asn1_length_der ()">asn1_length_der</a>                     (<em class="parameter"><code>unsigned long <a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
186
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *ans</code></em>,
 
187
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ans_len</code></em>);
 
188
<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="returnvalue">ASN1_TYPE</span></a>           <a class="link" href="gnutls-libtasn1.html#asn1-find-node" title="asn1_find_node ()">asn1_find_node</a>                      (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> pointer</code></em>,
 
189
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
 
190
<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        <a class="link" href="gnutls-libtasn1.html#asn1-copy-node" title="asn1_copy_node ()">asn1_copy_node</a>                      (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> dst</code></em>,
 
191
                                                         <em class="parameter"><code>const <span class="type">char</span> *dst_name</code></em>,
 
192
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> src</code></em>,
 
193
                                                         <em class="parameter"><code>const <span class="type">char</span> *src_name</code></em>);
 
194
#define             <a class="link" href="gnutls-libtasn1.html#LIBTASN1-VERSION:CAPS" title="LIBTASN1_VERSION">LIBTASN1_VERSION</a>
 
195
#define             <a class="link" href="gnutls-libtasn1.html#MAX-NAME-SIZE:CAPS" title="MAX_NAME_SIZE">MAX_NAME_SIZE</a>
 
196
#define             <a class="link" href="gnutls-libtasn1.html#MAX-ERROR-DESCRIPTION-SIZE:CAPS" title="MAX_ERROR_DESCRIPTION_SIZE">MAX_ERROR_DESCRIPTION_SIZE</a>
 
197
const <span class="returnvalue">char</span> *        <a class="link" href="gnutls-libtasn1.html#libtasn1-strerror" title="libtasn1_strerror ()">libtasn1_strerror</a>                   (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);
 
198
<span class="returnvalue">void</span>                <a class="link" href="gnutls-libtasn1.html#libtasn1-perror" title="libtasn1_perror ()">libtasn1_perror</a>                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);
200
199
</pre>
201
200
</div>
202
201
<div class="refsect1" title="Description">
207
206
<div class="refsect1" title="Details">
208
207
<a name="gnutls-libtasn1.details"></a><h2>Details</h2>
209
208
<div class="refsect2" title="ASN1_API">
210
 
<a name="ASN1-API--CAPS"></a><h3>ASN1_API</h3>
 
209
<a name="ASN1-API:CAPS"></a><h3>ASN1_API</h3>
211
210
<pre class="programlisting">#define             ASN1_API</pre>
212
211
<p>
213
212
</p>
214
213
</div>
215
214
<hr>
216
215
<div class="refsect2" title="ASN1_VERSION">
217
 
<a name="ASN1-VERSION--CAPS"></a><h3>ASN1_VERSION</h3>
 
216
<a name="ASN1-VERSION:CAPS"></a><h3>ASN1_VERSION</h3>
218
217
<pre class="programlisting">#define ASN1_VERSION "2.3"
219
218
</pre>
220
219
<p>
223
222
<hr>
224
223
<div class="refsect2" title="asn1_retCode">
225
224
<a name="asn1-retCode"></a><h3>asn1_retCode</h3>
226
 
<pre class="programlisting">  typedef int asn1_retCode; /* type returned by libtasn1 functions */
 
225
<pre class="programlisting">  typedef int asn1_retCode; /* type returned by libtasn1 functions */
227
226
</pre>
228
227
<p>
229
228
</p>
230
229
</div>
231
230
<hr>
232
231
<div class="refsect2" title="ASN1_SUCCESS">
233
 
<a name="ASN1-SUCCESS--CAPS"></a><h3>ASN1_SUCCESS</h3>
 
232
<a name="ASN1-SUCCESS:CAPS"></a><h3>ASN1_SUCCESS</h3>
234
233
<pre class="programlisting">#define ASN1_SUCCESS                        0
235
234
</pre>
236
235
<p>
238
237
</div>
239
238
<hr>
240
239
<div class="refsect2" title="ASN1_FILE_NOT_FOUND">
241
 
<a name="ASN1-FILE-NOT-FOUND--CAPS"></a><h3>ASN1_FILE_NOT_FOUND</h3>
 
240
<a name="ASN1-FILE-NOT-FOUND:CAPS"></a><h3>ASN1_FILE_NOT_FOUND</h3>
242
241
<pre class="programlisting">#define ASN1_FILE_NOT_FOUND         1
243
242
</pre>
244
243
<p>
246
245
</div>
247
246
<hr>
248
247
<div class="refsect2" title="ASN1_ELEMENT_NOT_FOUND">
249
 
<a name="ASN1-ELEMENT-NOT-FOUND--CAPS"></a><h3>ASN1_ELEMENT_NOT_FOUND</h3>
 
248
<a name="ASN1-ELEMENT-NOT-FOUND:CAPS"></a><h3>ASN1_ELEMENT_NOT_FOUND</h3>
250
249
<pre class="programlisting">#define ASN1_ELEMENT_NOT_FOUND              2
251
250
</pre>
252
251
<p>
254
253
</div>
255
254
<hr>
256
255
<div class="refsect2" title="ASN1_IDENTIFIER_NOT_FOUND">
257
 
<a name="ASN1-IDENTIFIER-NOT-FOUND--CAPS"></a><h3>ASN1_IDENTIFIER_NOT_FOUND</h3>
258
 
<pre class="programlisting">#define ASN1_IDENTIFIER_NOT_FOUND   3
 
256
<a name="ASN1-IDENTIFIER-NOT-FOUND:CAPS"></a><h3>ASN1_IDENTIFIER_NOT_FOUND</h3>
 
257
<pre class="programlisting">#define ASN1_IDENTIFIER_NOT_FOUND 3
259
258
</pre>
260
259
<p>
261
260
</p>
262
261
</div>
263
262
<hr>
264
263
<div class="refsect2" title="ASN1_DER_ERROR">
265
 
<a name="ASN1-DER-ERROR--CAPS"></a><h3>ASN1_DER_ERROR</h3>
 
264
<a name="ASN1-DER-ERROR:CAPS"></a><h3>ASN1_DER_ERROR</h3>
266
265
<pre class="programlisting">#define ASN1_DER_ERROR                      4
267
266
</pre>
268
267
<p>
270
269
</div>
271
270
<hr>
272
271
<div class="refsect2" title="ASN1_VALUE_NOT_FOUND">
273
 
<a name="ASN1-VALUE-NOT-FOUND--CAPS"></a><h3>ASN1_VALUE_NOT_FOUND</h3>
 
272
<a name="ASN1-VALUE-NOT-FOUND:CAPS"></a><h3>ASN1_VALUE_NOT_FOUND</h3>
274
273
<pre class="programlisting">#define ASN1_VALUE_NOT_FOUND                5
275
274
</pre>
276
275
<p>
278
277
</div>
279
278
<hr>
280
279
<div class="refsect2" title="ASN1_GENERIC_ERROR">
281
 
<a name="ASN1-GENERIC-ERROR--CAPS"></a><h3>ASN1_GENERIC_ERROR</h3>
 
280
<a name="ASN1-GENERIC-ERROR:CAPS"></a><h3>ASN1_GENERIC_ERROR</h3>
282
281
<pre class="programlisting">#define ASN1_GENERIC_ERROR          6
283
282
</pre>
284
283
<p>
286
285
</div>
287
286
<hr>
288
287
<div class="refsect2" title="ASN1_VALUE_NOT_VALID">
289
 
<a name="ASN1-VALUE-NOT-VALID--CAPS"></a><h3>ASN1_VALUE_NOT_VALID</h3>
 
288
<a name="ASN1-VALUE-NOT-VALID:CAPS"></a><h3>ASN1_VALUE_NOT_VALID</h3>
290
289
<pre class="programlisting">#define ASN1_VALUE_NOT_VALID                7
291
290
</pre>
292
291
<p>
294
293
</div>
295
294
<hr>
296
295
<div class="refsect2" title="ASN1_TAG_ERROR">
297
 
<a name="ASN1-TAG-ERROR--CAPS"></a><h3>ASN1_TAG_ERROR</h3>
 
296
<a name="ASN1-TAG-ERROR:CAPS"></a><h3>ASN1_TAG_ERROR</h3>
298
297
<pre class="programlisting">#define ASN1_TAG_ERROR                      8
299
298
</pre>
300
299
<p>
302
301
</div>
303
302
<hr>
304
303
<div class="refsect2" title="ASN1_TAG_IMPLICIT">
305
 
<a name="ASN1-TAG-IMPLICIT--CAPS"></a><h3>ASN1_TAG_IMPLICIT</h3>
 
304
<a name="ASN1-TAG-IMPLICIT:CAPS"></a><h3>ASN1_TAG_IMPLICIT</h3>
306
305
<pre class="programlisting">#define ASN1_TAG_IMPLICIT           9
307
306
</pre>
308
307
<p>
310
309
</div>
311
310
<hr>
312
311
<div class="refsect2" title="ASN1_ERROR_TYPE_ANY">
313
 
<a name="ASN1-ERROR-TYPE-ANY--CAPS"></a><h3>ASN1_ERROR_TYPE_ANY</h3>
 
312
<a name="ASN1-ERROR-TYPE-ANY:CAPS"></a><h3>ASN1_ERROR_TYPE_ANY</h3>
314
313
<pre class="programlisting">#define ASN1_ERROR_TYPE_ANY         10
315
314
</pre>
316
315
<p>
318
317
</div>
319
318
<hr>
320
319
<div class="refsect2" title="ASN1_SYNTAX_ERROR">
321
 
<a name="ASN1-SYNTAX-ERROR--CAPS"></a><h3>ASN1_SYNTAX_ERROR</h3>
 
320
<a name="ASN1-SYNTAX-ERROR:CAPS"></a><h3>ASN1_SYNTAX_ERROR</h3>
322
321
<pre class="programlisting">#define ASN1_SYNTAX_ERROR           11
323
322
</pre>
324
323
<p>
326
325
</div>
327
326
<hr>
328
327
<div class="refsect2" title="ASN1_MEM_ERROR">
329
 
<a name="ASN1-MEM-ERROR--CAPS"></a><h3>ASN1_MEM_ERROR</h3>
 
328
<a name="ASN1-MEM-ERROR:CAPS"></a><h3>ASN1_MEM_ERROR</h3>
330
329
<pre class="programlisting">#define ASN1_MEM_ERROR                      12
331
330
</pre>
332
331
<p>
334
333
</div>
335
334
<hr>
336
335
<div class="refsect2" title="ASN1_MEM_ALLOC_ERROR">
337
 
<a name="ASN1-MEM-ALLOC-ERROR--CAPS"></a><h3>ASN1_MEM_ALLOC_ERROR</h3>
 
336
<a name="ASN1-MEM-ALLOC-ERROR:CAPS"></a><h3>ASN1_MEM_ALLOC_ERROR</h3>
338
337
<pre class="programlisting">#define ASN1_MEM_ALLOC_ERROR                13
339
338
</pre>
340
339
<p>
342
341
</div>
343
342
<hr>
344
343
<div class="refsect2" title="ASN1_DER_OVERFLOW">
345
 
<a name="ASN1-DER-OVERFLOW--CAPS"></a><h3>ASN1_DER_OVERFLOW</h3>
 
344
<a name="ASN1-DER-OVERFLOW:CAPS"></a><h3>ASN1_DER_OVERFLOW</h3>
346
345
<pre class="programlisting">#define ASN1_DER_OVERFLOW           14
347
346
</pre>
348
347
<p>
350
349
</div>
351
350
<hr>
352
351
<div class="refsect2" title="ASN1_NAME_TOO_LONG">
353
 
<a name="ASN1-NAME-TOO-LONG--CAPS"></a><h3>ASN1_NAME_TOO_LONG</h3>
 
352
<a name="ASN1-NAME-TOO-LONG:CAPS"></a><h3>ASN1_NAME_TOO_LONG</h3>
354
353
<pre class="programlisting">#define ASN1_NAME_TOO_LONG          15
355
354
</pre>
356
355
<p>
358
357
</div>
359
358
<hr>
360
359
<div class="refsect2" title="ASN1_ARRAY_ERROR">
361
 
<a name="ASN1-ARRAY-ERROR--CAPS"></a><h3>ASN1_ARRAY_ERROR</h3>
 
360
<a name="ASN1-ARRAY-ERROR:CAPS"></a><h3>ASN1_ARRAY_ERROR</h3>
362
361
<pre class="programlisting">#define ASN1_ARRAY_ERROR            16
363
362
</pre>
364
363
<p>
366
365
</div>
367
366
<hr>
368
367
<div class="refsect2" title="ASN1_ELEMENT_NOT_EMPTY">
369
 
<a name="ASN1-ELEMENT-NOT-EMPTY--CAPS"></a><h3>ASN1_ELEMENT_NOT_EMPTY</h3>
 
368
<a name="ASN1-ELEMENT-NOT-EMPTY:CAPS"></a><h3>ASN1_ELEMENT_NOT_EMPTY</h3>
370
369
<pre class="programlisting">#define ASN1_ELEMENT_NOT_EMPTY              17
371
370
</pre>
372
371
<p>
374
373
</div>
375
374
<hr>
376
375
<div class="refsect2" title="ASN1_PRINT_NAME">
377
 
<a name="ASN1-PRINT-NAME--CAPS"></a><h3>ASN1_PRINT_NAME</h3>
 
376
<a name="ASN1-PRINT-NAME:CAPS"></a><h3>ASN1_PRINT_NAME</h3>
378
377
<pre class="programlisting">#define ASN1_PRINT_NAME                     1
379
378
</pre>
380
379
<p>
382
381
</div>
383
382
<hr>
384
383
<div class="refsect2" title="ASN1_PRINT_NAME_TYPE">
385
 
<a name="ASN1-PRINT-NAME-TYPE--CAPS"></a><h3>ASN1_PRINT_NAME_TYPE</h3>
 
384
<a name="ASN1-PRINT-NAME-TYPE:CAPS"></a><h3>ASN1_PRINT_NAME_TYPE</h3>
386
385
<pre class="programlisting">#define ASN1_PRINT_NAME_TYPE                2
387
386
</pre>
388
387
<p>
390
389
</div>
391
390
<hr>
392
391
<div class="refsect2" title="ASN1_PRINT_NAME_TYPE_VALUE">
393
 
<a name="ASN1-PRINT-NAME-TYPE-VALUE--CAPS"></a><h3>ASN1_PRINT_NAME_TYPE_VALUE</h3>
394
 
<pre class="programlisting">#define ASN1_PRINT_NAME_TYPE_VALUE  3
 
392
<a name="ASN1-PRINT-NAME-TYPE-VALUE:CAPS"></a><h3>ASN1_PRINT_NAME_TYPE_VALUE</h3>
 
393
<pre class="programlisting">#define ASN1_PRINT_NAME_TYPE_VALUE 3
395
394
</pre>
396
395
<p>
397
396
</p>
398
397
</div>
399
398
<hr>
400
399
<div class="refsect2" title="ASN1_PRINT_ALL">
401
 
<a name="ASN1-PRINT-ALL--CAPS"></a><h3>ASN1_PRINT_ALL</h3>
 
400
<a name="ASN1-PRINT-ALL:CAPS"></a><h3>ASN1_PRINT_ALL</h3>
402
401
<pre class="programlisting">#define ASN1_PRINT_ALL                      4
403
402
</pre>
404
403
<p>
406
405
</div>
407
406
<hr>
408
407
<div class="refsect2" title="ASN1_CLASS_UNIVERSAL">
409
 
<a name="ASN1-CLASS-UNIVERSAL--CAPS"></a><h3>ASN1_CLASS_UNIVERSAL</h3>
410
 
<pre class="programlisting">#define ASN1_CLASS_UNIVERSAL                0x00    /* old: 1 */
 
408
<a name="ASN1-CLASS-UNIVERSAL:CAPS"></a><h3>ASN1_CLASS_UNIVERSAL</h3>
 
409
<pre class="programlisting">#define ASN1_CLASS_UNIVERSAL                0x00 /* old: 1 */
411
410
</pre>
412
411
<p>
413
412
</p>
414
413
</div>
415
414
<hr>
416
415
<div class="refsect2" title="ASN1_CLASS_APPLICATION">
417
 
<a name="ASN1-CLASS-APPLICATION--CAPS"></a><h3>ASN1_CLASS_APPLICATION</h3>
418
 
<pre class="programlisting">#define ASN1_CLASS_APPLICATION              0x40    /* old: 2 */
 
416
<a name="ASN1-CLASS-APPLICATION:CAPS"></a><h3>ASN1_CLASS_APPLICATION</h3>
 
417
<pre class="programlisting">#define ASN1_CLASS_APPLICATION              0x40 /* old: 2 */
419
418
</pre>
420
419
<p>
421
420
</p>
422
421
</div>
423
422
<hr>
424
423
<div class="refsect2" title="ASN1_CLASS_CONTEXT_SPECIFIC">
425
 
<a name="ASN1-CLASS-CONTEXT-SPECIFIC--CAPS"></a><h3>ASN1_CLASS_CONTEXT_SPECIFIC</h3>
426
 
<pre class="programlisting">#define ASN1_CLASS_CONTEXT_SPECIFIC 0x80    /* old: 3 */
 
424
<a name="ASN1-CLASS-CONTEXT-SPECIFIC:CAPS"></a><h3>ASN1_CLASS_CONTEXT_SPECIFIC</h3>
 
425
<pre class="programlisting">#define ASN1_CLASS_CONTEXT_SPECIFIC 0x80 /* old: 3 */
427
426
</pre>
428
427
<p>
429
428
</p>
430
429
</div>
431
430
<hr>
432
431
<div class="refsect2" title="ASN1_CLASS_PRIVATE">
433
 
<a name="ASN1-CLASS-PRIVATE--CAPS"></a><h3>ASN1_CLASS_PRIVATE</h3>
434
 
<pre class="programlisting">#define ASN1_CLASS_PRIVATE          0xC0    /* old: 4 */
 
432
<a name="ASN1-CLASS-PRIVATE:CAPS"></a><h3>ASN1_CLASS_PRIVATE</h3>
 
433
<pre class="programlisting">#define ASN1_CLASS_PRIVATE          0xC0 /* old: 4 */
435
434
</pre>
436
435
<p>
437
436
</p>
438
437
</div>
439
438
<hr>
440
439
<div class="refsect2" title="ASN1_CLASS_STRUCTURED">
441
 
<a name="ASN1-CLASS-STRUCTURED--CAPS"></a><h3>ASN1_CLASS_STRUCTURED</h3>
 
440
<a name="ASN1-CLASS-STRUCTURED:CAPS"></a><h3>ASN1_CLASS_STRUCTURED</h3>
442
441
<pre class="programlisting">#define ASN1_CLASS_STRUCTURED               0x20
443
442
</pre>
444
443
<p>
446
445
</div>
447
446
<hr>
448
447
<div class="refsect2" title="ASN1_TAG_BOOLEAN">
449
 
<a name="ASN1-TAG-BOOLEAN--CAPS"></a><h3>ASN1_TAG_BOOLEAN</h3>
 
448
<a name="ASN1-TAG-BOOLEAN:CAPS"></a><h3>ASN1_TAG_BOOLEAN</h3>
450
449
<pre class="programlisting">#define ASN1_TAG_BOOLEAN            0x01
451
450
</pre>
452
451
<p>
454
453
</div>
455
454
<hr>
456
455
<div class="refsect2" title="ASN1_TAG_INTEGER">
457
 
<a name="ASN1-TAG-INTEGER--CAPS"></a><h3>ASN1_TAG_INTEGER</h3>
 
456
<a name="ASN1-TAG-INTEGER:CAPS"></a><h3>ASN1_TAG_INTEGER</h3>
458
457
<pre class="programlisting">#define ASN1_TAG_INTEGER            0x02
459
458
</pre>
460
459
<p>
462
461
</div>
463
462
<hr>
464
463
<div class="refsect2" title="ASN1_TAG_SEQUENCE">
465
 
<a name="ASN1-TAG-SEQUENCE--CAPS"></a><h3>ASN1_TAG_SEQUENCE</h3>
 
464
<a name="ASN1-TAG-SEQUENCE:CAPS"></a><h3>ASN1_TAG_SEQUENCE</h3>
466
465
<pre class="programlisting">#define ASN1_TAG_SEQUENCE           0x10
467
466
</pre>
468
467
<p>
470
469
</div>
471
470
<hr>
472
471
<div class="refsect2" title="ASN1_TAG_SET">
473
 
<a name="ASN1-TAG-SET--CAPS"></a><h3>ASN1_TAG_SET</h3>
 
472
<a name="ASN1-TAG-SET:CAPS"></a><h3>ASN1_TAG_SET</h3>
474
473
<pre class="programlisting">#define ASN1_TAG_SET                        0x11
475
474
</pre>
476
475
<p>
478
477
</div>
479
478
<hr>
480
479
<div class="refsect2" title="ASN1_TAG_OCTET_STRING">
481
 
<a name="ASN1-TAG-OCTET-STRING--CAPS"></a><h3>ASN1_TAG_OCTET_STRING</h3>
 
480
<a name="ASN1-TAG-OCTET-STRING:CAPS"></a><h3>ASN1_TAG_OCTET_STRING</h3>
482
481
<pre class="programlisting">#define ASN1_TAG_OCTET_STRING               0x04
483
482
</pre>
484
483
<p>
486
485
</div>
487
486
<hr>
488
487
<div class="refsect2" title="ASN1_TAG_BIT_STRING">
489
 
<a name="ASN1-TAG-BIT-STRING--CAPS"></a><h3>ASN1_TAG_BIT_STRING</h3>
 
488
<a name="ASN1-TAG-BIT-STRING:CAPS"></a><h3>ASN1_TAG_BIT_STRING</h3>
490
489
<pre class="programlisting">#define ASN1_TAG_BIT_STRING         0x03
491
490
</pre>
492
491
<p>
503
502
<hr>
504
503
<div class="refsect2" title="ASN1_TAG_GENERALIZEDTime">
505
504
<a name="ASN1-TAG-GENERALIZEDTime"></a><h3>ASN1_TAG_GENERALIZEDTime</h3>
506
 
<pre class="programlisting">#define ASN1_TAG_GENERALIZEDTime    0x18
 
505
<pre class="programlisting">#define ASN1_TAG_GENERALIZEDTime 0x18
507
506
</pre>
508
507
<p>
509
508
</p>
510
509
</div>
511
510
<hr>
512
511
<div class="refsect2" title="ASN1_TAG_OBJECT_ID">
513
 
<a name="ASN1-TAG-OBJECT-ID--CAPS"></a><h3>ASN1_TAG_OBJECT_ID</h3>
 
512
<a name="ASN1-TAG-OBJECT-ID:CAPS"></a><h3>ASN1_TAG_OBJECT_ID</h3>
514
513
<pre class="programlisting">#define ASN1_TAG_OBJECT_ID          0x06
515
514
</pre>
516
515
<p>
518
517
</div>
519
518
<hr>
520
519
<div class="refsect2" title="ASN1_TAG_ENUMERATED">
521
 
<a name="ASN1-TAG-ENUMERATED--CAPS"></a><h3>ASN1_TAG_ENUMERATED</h3>
 
520
<a name="ASN1-TAG-ENUMERATED:CAPS"></a><h3>ASN1_TAG_ENUMERATED</h3>
522
521
<pre class="programlisting">#define ASN1_TAG_ENUMERATED         0x0A
523
522
</pre>
524
523
<p>
526
525
</div>
527
526
<hr>
528
527
<div class="refsect2" title="ASN1_TAG_NULL">
529
 
<a name="ASN1-TAG-NULL--CAPS"></a><h3>ASN1_TAG_NULL</h3>
 
528
<a name="ASN1-TAG-NULL:CAPS"></a><h3>ASN1_TAG_NULL</h3>
530
529
<pre class="programlisting">#define ASN1_TAG_NULL                       0x05
531
530
</pre>
532
531
<p>
534
533
</div>
535
534
<hr>
536
535
<div class="refsect2" title="ASN1_TAG_GENERALSTRING">
537
 
<a name="ASN1-TAG-GENERALSTRING--CAPS"></a><h3>ASN1_TAG_GENERALSTRING</h3>
 
536
<a name="ASN1-TAG-GENERALSTRING:CAPS"></a><h3>ASN1_TAG_GENERALSTRING</h3>
538
537
<pre class="programlisting">#define ASN1_TAG_GENERALSTRING              0x1B
539
538
</pre>
540
539
<p>
550
549
</div>
551
550
<hr>
552
551
<div class="refsect2" title="ASN1_TYPE">
553
 
<a name="ASN1-TYPE--CAPS"></a><h3>ASN1_TYPE</h3>
 
552
<a name="ASN1-TYPE:CAPS"></a><h3>ASN1_TYPE</h3>
554
553
<pre class="programlisting">  typedef node_asn *ASN1_TYPE;
555
554
</pre>
556
555
<p>
558
557
</div>
559
558
<hr>
560
559
<div class="refsect2" title="ASN1_TYPE_EMPTY">
561
 
<a name="ASN1-TYPE-EMPTY--CAPS"></a><h3>ASN1_TYPE_EMPTY</h3>
 
560
<a name="ASN1-TYPE-EMPTY:CAPS"></a><h3>ASN1_TYPE_EMPTY</h3>
562
561
<pre class="programlisting">#define ASN1_TYPE_EMPTY  NULL
563
562
</pre>
564
563
<p>
566
565
</div>
567
566
<hr>
568
567
<div class="refsect2" title="ASN1_ARRAY_TYPE">
569
 
<a name="ASN1-ARRAY-TYPE--CAPS"></a><h3>ASN1_ARRAY_TYPE</h3>
 
568
<a name="ASN1-ARRAY-TYPE:CAPS"></a><h3>ASN1_ARRAY_TYPE</h3>
570
569
<pre class="programlisting">  typedef struct static_struct_asn ASN1_ARRAY_TYPE;
571
570
</pre>
572
571
<p>
574
573
</div>
575
574
<hr>
576
575
<div class="refsect2" title="ASN1_MAX_NAME_SIZE">
577
 
<a name="ASN1-MAX-NAME-SIZE--CAPS"></a><h3>ASN1_MAX_NAME_SIZE</h3>
 
576
<a name="ASN1-MAX-NAME-SIZE:CAPS"></a><h3>ASN1_MAX_NAME_SIZE</h3>
578
577
<pre class="programlisting">#define             ASN1_MAX_NAME_SIZE</pre>
579
578
<p>
580
579
</p>
581
580
</div>
582
581
<hr>
583
582
<div class="refsect2" title="ASN1_MAX_ERROR_DESCRIPTION_SIZE">
584
 
<a name="ASN1-MAX-ERROR-DESCRIPTION-SIZE--CAPS"></a><h3>ASN1_MAX_ERROR_DESCRIPTION_SIZE</h3>
 
583
<a name="ASN1-MAX-ERROR-DESCRIPTION-SIZE:CAPS"></a><h3>ASN1_MAX_ERROR_DESCRIPTION_SIZE</h3>
585
584
<pre class="programlisting">#define             ASN1_MAX_ERROR_DESCRIPTION_SIZE</pre>
586
585
<p>
587
586
</p>
589
588
<hr>
590
589
<div class="refsect2" title="asn1_parser2tree ()">
591
590
<a name="asn1-parser2tree"></a><h3>asn1_parser2tree ()</h3>
592
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_parser2tree                    (const char *file_name,
593
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *definitions,
594
 
                                                         char *errorDescription);</pre>
 
591
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_parser2tree                    (<em class="parameter"><code>const <span class="type">char</span> *file_name</code></em>,
 
592
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *definitions</code></em>,
 
593
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);</pre>
595
594
<p>
596
595
</p>
597
596
<div class="variablelist"><table border="0">
623
622
<hr>
624
623
<div class="refsect2" title="asn1_parser2array ()">
625
624
<a name="asn1-parser2array"></a><h3>asn1_parser2array ()</h3>
626
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_parser2array                   (const char *inputFileName,
627
 
                                                         const char *outputFileName,
628
 
                                                         const char *vectorName,
629
 
                                                         char *errorDescription);</pre>
 
625
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_parser2array                   (<em class="parameter"><code>const <span class="type">char</span> *inputFileName</code></em>,
 
626
                                                         <em class="parameter"><code>const <span class="type">char</span> *outputFileName</code></em>,
 
627
                                                         <em class="parameter"><code>const <span class="type">char</span> *vectorName</code></em>,
 
628
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);</pre>
630
629
<p>
631
630
</p>
632
631
<div class="variablelist"><table border="0">
663
662
<hr>
664
663
<div class="refsect2" title="asn1_array2tree ()">
665
664
<a name="asn1-array2tree"></a><h3>asn1_array2tree ()</h3>
666
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_array2tree                     (const <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE--CAPS" title="ASN1_ARRAY_TYPE">ASN1_ARRAY_TYPE</a> *array,
667
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *definitions,
668
 
                                                         char *errorDescription);</pre>
669
 
<p>
670
 
Creates the structures needed to manage the ASN.1 definitions.
671
 
<em class="parameter"><code>array</code></em> is a vector created by <a class="link" href="gnutls-libtasn1.html#asn1-parser2array" title="asn1_parser2array ()"><code class="function">asn1_parser2array()</code></a>.</p>
 
665
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_array2tree                     (<em class="parameter"><code>const <a class="link" href="gnutls-libtasn1.html#ASN1-ARRAY-TYPE:CAPS" title="ASN1_ARRAY_TYPE"><span class="type">ASN1_ARRAY_TYPE</span></a> *array</code></em>,
 
666
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *definitions</code></em>,
 
667
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);</pre>
672
668
<p>
673
669
</p>
674
670
<div class="variablelist"><table border="0">
676
672
<tbody>
677
673
<tr>
678
674
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
679
 
<td> specify the array that contains ASN.1 declarations
 
675
<td>
680
676
</td>
681
677
</tr>
682
678
<tr>
683
679
<td><p><span class="term"><em class="parameter"><code>definitions</code></em> :</span></p></td>
684
 
<td> return the pointer to the structure created by
685
 
  *ARRAY ASN.1 declarations
 
680
<td>
686
681
</td>
687
682
</tr>
688
683
<tr>
689
684
<td><p><span class="term"><em class="parameter"><code>errorDescription</code></em> :</span></p></td>
690
 
<td> return the error description.
 
685
<td>
691
686
</td>
692
687
</tr>
693
688
<tr>
694
689
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
695
690
<td>
696
 
 
697
 
ASN1_SUCCESS: Structure created correctly.
698
 
 
699
 
ASN1_ELEMENT_NOT_EMPTY: *<em class="parameter"><code>definitions</code></em> not ASN1_TYPE_EMPTY.
700
 
 
701
 
ASN1_IDENTIFIER_NOT_FOUND: In the file there is an identifier that
702
 
  is not defined (see <em class="parameter"><code>errorDescription</code></em> for more information).
703
 
 
704
 
ASN1_ARRAY_ERROR: The array pointed by <em class="parameter"><code>array</code></em> is wrong.
705
691
</td>
706
692
</tr>
707
693
</tbody>
710
696
<hr>
711
697
<div class="refsect2" title="asn1_print_structure ()">
712
698
<a name="asn1-print-structure"></a><h3>asn1_print_structure ()</h3>
713
 
<pre class="programlisting">void                asn1_print_structure                (FILE *out,
714
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> structure,
715
 
                                                         const char *name,
716
 
                                                         int mode);</pre>
717
 
<p>
718
 
Prints on the <em class="parameter"><code>out</code></em> file descriptor the structure's tree starting
719
 
from the <em class="parameter"><code>name</code></em> element inside the structure <em class="parameter"><code>structure</code></em>.</p>
 
699
<pre class="programlisting"><span class="returnvalue">void</span>                asn1_print_structure                (<em class="parameter"><code><span class="type">FILE</span> *out</code></em>,
 
700
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> structure</code></em>,
 
701
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
702
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> mode</code></em>);</pre>
720
703
<p>
721
704
</p>
722
705
<div class="variablelist"><table border="0">
724
707
<tbody>
725
708
<tr>
726
709
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
727
 
<td> pointer to the output file (e.g. stdout).
 
710
<td>
728
711
</td>
729
712
</tr>
730
713
<tr>
731
714
<td><p><span class="term"><em class="parameter"><code>structure</code></em> :</span></p></td>
732
 
<td> pointer to the structure that you want to visit.
 
715
<td>
733
716
</td>
734
717
</tr>
735
718
<tr>
736
719
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
737
 
<td> an element of the structure
 
720
<td>
738
721
</td>
739
722
</tr>
740
723
<tr>
741
724
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
742
 
<td> specify how much of the structure to print, can be
743
 
  <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME--CAPS" title="ASN1_PRINT_NAME"><code class="literal">ASN1_PRINT_NAME</code></a>, <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE--CAPS" title="ASN1_PRINT_NAME_TYPE"><code class="literal">ASN1_PRINT_NAME_TYPE</code></a>,
744
 
  <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-NAME-TYPE-VALUE--CAPS" title="ASN1_PRINT_NAME_TYPE_VALUE"><code class="literal">ASN1_PRINT_NAME_TYPE_VALUE</code></a>, or <a class="link" href="gnutls-libtasn1.html#ASN1-PRINT-ALL--CAPS" title="ASN1_PRINT_ALL"><code class="literal">ASN1_PRINT_ALL</code></a>.
 
725
<td>
745
726
</td>
746
727
</tr>
747
728
</tbody>
750
731
<hr>
751
732
<div class="refsect2" title="asn1_create_element ()">
752
733
<a name="asn1-create-element"></a><h3>asn1_create_element ()</h3>
753
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_create_element                 (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
754
 
                                                         const char *source_name,
755
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element);</pre>
756
 
<p>
757
 
Creates a structure of type <em class="parameter"><code>source_name</code></em>.  Example using
758
 
 "pkix.asn":
759
 
</p>
760
 
<p>
761
 
rc = asn1_create_structure(cert_def, "PKIX1.Certificate",
762
 
certptr);</p>
 
734
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_create_element                 (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
735
                                                         <em class="parameter"><code>const <span class="type">char</span> *source_name</code></em>,
 
736
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>);</pre>
763
737
<p>
764
738
</p>
765
739
<div class="variablelist"><table border="0">
767
741
<tbody>
768
742
<tr>
769
743
<td><p><span class="term"><em class="parameter"><code>definitions</code></em> :</span></p></td>
770
 
<td> pointer to the structure returned by "parser_asn1" function
 
744
<td>
771
745
</td>
772
746
</tr>
773
747
<tr>
774
748
<td><p><span class="term"><em class="parameter"><code>source_name</code></em> :</span></p></td>
775
 
<td> the name of the type of the new structure (must be
776
 
  inside p_structure).
 
749
<td>
777
750
</td>
778
751
</tr>
779
752
<tr>
780
753
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
781
 
<td> pointer to the structure created.
 
754
<td>
782
755
</td>
783
756
</tr>
784
757
<tr>
785
758
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
786
759
<td>
787
 
 
788
 
ASN1_SUCCESS: Creation OK.
789
 
 
790
 
ASN1_ELEMENT_NOT_FOUND: SOURCE_NAME isn't known
791
760
</td>
792
761
</tr>
793
762
</tbody>
796
765
<hr>
797
766
<div class="refsect2" title="asn1_delete_structure ()">
798
767
<a name="asn1-delete-structure"></a><h3>asn1_delete_structure ()</h3>
799
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_delete_structure               (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *structure);</pre>
800
 
<p>
801
 
Deletes the structure *<em class="parameter"><code>structure</code></em>.  At the end, *<em class="parameter"><code>structure</code></em> is set
802
 
to ASN1_TYPE_EMPTY.</p>
 
768
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_delete_structure               (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *structure</code></em>);</pre>
803
769
<p>
804
770
</p>
805
771
<div class="variablelist"><table border="0">
807
773
<tbody>
808
774
<tr>
809
775
<td><p><span class="term"><em class="parameter"><code>structure</code></em> :</span></p></td>
810
 
<td> pointer to the structure that you want to delete.
 
776
<td>
811
777
</td>
812
778
</tr>
813
779
<tr>
814
780
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
815
781
<td>
816
 
 
817
 
ASN1_SUCCESS: Everything OK.
818
 
 
819
 
ASN1_ELEMENT_NOT_FOUND: *<em class="parameter"><code>structure</code></em> was ASN1_TYPE_EMPTY.
820
 
 
821
782
</td>
822
783
</tr>
823
784
</tbody>
826
787
<hr>
827
788
<div class="refsect2" title="asn1_delete_element ()">
828
789
<a name="asn1-delete-element"></a><h3>asn1_delete_element ()</h3>
829
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_delete_element                 (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> structure,
830
 
                                                         const char *element_name);</pre>
831
 
<p>
832
 
Deletes the element named *<em class="parameter"><code>element_name</code></em> inside *<em class="parameter"><code>structure</code></em>.</p>
 
790
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_delete_element                 (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> structure</code></em>,
 
791
                                                         <em class="parameter"><code>const <span class="type">char</span> *element_name</code></em>);</pre>
833
792
<p>
834
793
</p>
835
794
<div class="variablelist"><table border="0">
837
796
<tbody>
838
797
<tr>
839
798
<td><p><span class="term"><em class="parameter"><code>structure</code></em> :</span></p></td>
840
 
<td> pointer to the structure that contains the element you
841
 
  want to delete.
 
799
<td>
842
800
</td>
843
801
</tr>
844
802
<tr>
845
803
<td><p><span class="term"><em class="parameter"><code>element_name</code></em> :</span></p></td>
846
 
<td> element's name you want to delete.
 
804
<td>
847
805
</td>
848
806
</tr>
849
807
<tr>
850
808
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
851
809
<td>
852
 
 
853
 
ASN1_SUCCESS: Everything OK.
854
 
 
855
 
ASN1_ELEMENT_NOT_FOUND: The name element was not found.
856
 
 
857
810
</td>
858
811
</tr>
859
812
</tbody>
862
815
<hr>
863
816
<div class="refsect2" title="asn1_write_value ()">
864
817
<a name="asn1-write-value"></a><h3>asn1_write_value ()</h3>
865
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_write_value                    (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> node_root,
866
 
                                                         const char *name,
867
 
                                                         const void *ivalue,
868
 
                                                         int len);</pre>
869
 
<p>
870
 
Set the value of one element inside a structure.
871
 
</p>
872
 
<p>
873
 
If an element is OPTIONAL and you want to delete it, you must use
874
 
the value=NULL and len=0.  Using "pkix.asn":
875
 
</p>
876
 
<p>
877
 
result=asn1_write_value(cert, "tbsCertificate.issuerUniqueID",
878
 
NULL, 0);
879
 
</p>
880
 
<p>
881
 
Description for each type:
882
 
</p>
883
 
<p>
884
 
INTEGER: VALUE must contain a two's complement form integer.
885
 
</p>
886
 
<p>
887
 
           value[0]=0xFF ,               len=1 -&gt; integer=-1.
888
 
           value[0]=0xFF value[1]=0xFF , len=2 -&gt; integer=-1.
889
 
           value[0]=0x01 ,               len=1 -&gt; integer= 1.
890
 
           value[0]=0x00 value[1]=0x01 , len=2 -&gt; integer= 1.
891
 
           value="123"                 , len=0 -&gt; integer= 123.
892
 
</p>
893
 
<p>
894
 
ENUMERATED: As INTEGER (but only with not negative numbers).
895
 
</p>
896
 
<p>
897
 
BOOLEAN: VALUE must be the null terminated string "TRUE" or
898
 
  "FALSE" and LEN != 0.
899
 
</p>
900
 
<p>
901
 
           value="TRUE" , len=1 -&gt; boolean=TRUE.
902
 
           value="FALSE" , len=1 -&gt; boolean=FALSE.
903
 
</p>
904
 
<p>
905
 
OBJECT IDENTIFIER: VALUE must be a null terminated string with
906
 
  each number separated by a dot (e.g. "1.2.3.543.1").  LEN != 0.
907
 
</p>
908
 
<p>
909
 
           value="1 2 840 10040 4 3" , len=1 -&gt; OID=dsa-with-sha.
910
 
</p>
911
 
<p>
912
 
UTCTime: VALUE must be a null terminated string in one of these
913
 
  formats: "YYMMDDhhmmssZ", "YYMMDDhhmmssZ",
914
 
  "YYMMDDhhmmss+hh'mm'", "YYMMDDhhmmss-hh'mm'",
915
 
  "YYMMDDhhmm+hh'mm'", or "YYMMDDhhmm-hh'mm'".  LEN != 0.
916
 
</p>
917
 
<p>
918
 
           value="9801011200Z" , len=1 -&gt; time=Jannuary 1st, 1998
919
 
           at 12h 00m Greenwich Mean Time
920
 
</p>
921
 
<p>
922
 
GeneralizedTime: VALUE must be in one of this format:
923
 
  "YYYYMMDDhhmmss.sZ", "YYYYMMDDhhmmss.sZ",
924
 
  "YYYYMMDDhhmmss.s+hh'mm'", "YYYYMMDDhhmmss.s-hh'mm'",
925
 
  "YYYYMMDDhhmm+hh'mm'", or "YYYYMMDDhhmm-hh'mm'" where ss.s
926
 
  indicates the seconds with any precision like "10.1" or "01.02".
927
 
  LEN != 0
928
 
</p>
929
 
<p>
930
 
           value="2001010112001.12-0700" , len=1 -&gt; time=Jannuary
931
 
           1st, 2001 at 12h 00m 01.12s Pacific Daylight Time
932
 
</p>
933
 
<p>
934
 
OCTET STRING: VALUE contains the octet string and LEN is the
935
 
  number of octets.
936
 
</p>
937
 
<p>
938
 
           value="$\backslash$x01$\backslash$x02$\backslash$x03" ,
939
 
           len=3 -&gt; three bytes octet string
940
 
</p>
941
 
<p>
942
 
GeneralString: VALUE contains the generalstring and LEN is the
943
 
  number of octets.
944
 
</p>
945
 
<p>
946
 
           value="$\backslash$x01$\backslash$x02$\backslash$x03" ,
947
 
           len=3 -&gt; three bytes generalstring
948
 
</p>
949
 
<p>
950
 
BIT STRING: VALUE contains the bit string organized by bytes and
951
 
  LEN is the number of bits.
952
 
</p>
953
 
<p>
954
 
  value="$\backslash$xCF" , len=6 -&gt; bit string="110011" (six
955
 
  bits)
956
 
</p>
957
 
<p>
958
 
CHOICE: if NAME indicates a choice type, VALUE must specify one of
959
 
  the alternatives with a null terminated string. LEN != 0. Using
960
 
  "pkix.asn"\:
961
 
</p>
962
 
<p>
963
 
          result=asn1_write_value(cert,
964
 
          "certificate1.tbsCertificate.subject", "rdnSequence",
965
 
          1);
966
 
</p>
967
 
<p>
968
 
ANY: VALUE indicates the der encoding of a structure.  LEN != 0.
969
 
</p>
970
 
<p>
971
 
SEQUENCE OF: VALUE must be the null terminated string "NEW" and
972
 
  LEN != 0. With this instruction another element is appended in
973
 
  the sequence. The name of this element will be "?1" if it's the
974
 
  first one, "?2" for the second and so on.
975
 
</p>
976
 
<p>
977
 
  Using "pkix.asn"\:
978
 
</p>
979
 
<p>
980
 
  result=asn1_write_value(cert,
981
 
  "certificate1.tbsCertificate.subject.rdnSequence", "NEW", 1);
982
 
</p>
983
 
<p>
984
 
SET OF: the same as SEQUENCE OF.  Using "pkix.asn":
985
 
</p>
986
 
<p>
987
 
          result=asn1_write_value(cert,
988
 
          "tbsCertificate.subject.rdnSequence.?LAST", "NEW", 1);</p>
 
818
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_write_value                    (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> node_root</code></em>,
 
819
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
820
                                                         <em class="parameter"><code>const <span class="type">void</span> *ivalue</code></em>,
 
821
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>);</pre>
989
822
<p>
990
823
</p>
991
824
<div class="variablelist"><table border="0">
993
826
<tbody>
994
827
<tr>
995
828
<td><p><span class="term"><em class="parameter"><code>node_root</code></em> :</span></p></td>
996
 
<td> pointer to a structure
 
829
<td>
997
830
</td>
998
831
</tr>
999
832
<tr>
1000
833
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1001
 
<td> the name of the element inside the structure that you want to set.
 
834
<td>
1002
835
</td>
1003
836
</tr>
1004
837
<tr>
1005
838
<td><p><span class="term"><em class="parameter"><code>ivalue</code></em> :</span></p></td>
1006
 
<td> vector used to specify the value to set. If len is &gt;0,
1007
 
  VALUE must be a two's complement form integer.  if len=0 *VALUE
1008
 
  must be a null terminated string with an integer value.
 
839
<td>
1009
840
</td>
1010
841
</tr>
1011
842
<tr>
1012
843
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1013
 
<td> number of bytes of *value to use to set the value:
1014
 
  value[0]..value[len-1] or 0 if value is a null terminated string
 
844
<td>
1015
845
</td>
1016
846
</tr>
1017
847
<tr>
1018
848
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1019
849
<td>
1020
 
 
1021
 
  ASN1_SUCCESS: Set value OK.
1022
 
 
1023
 
  ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
1024
 
 
1025
 
  ASN1_VALUE_NOT_VALID: VALUE has a wrong format.
1026
 
 
1027
850
</td>
1028
851
</tr>
1029
852
</tbody>
1032
855
<hr>
1033
856
<div class="refsect2" title="asn1_read_value ()">
1034
857
<a name="asn1-read-value"></a><h3>asn1_read_value ()</h3>
1035
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_read_value                     (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> root,
1036
 
                                                         const char *name,
1037
 
                                                         void *ivalue,
1038
 
                                                         int *len);</pre>
1039
 
<p>
1040
 
Returns the value of one element inside a structure.
1041
 
</p>
1042
 
<p>
1043
 
If an element is OPTIONAL and the function "read_value" returns
1044
 
<a class="link" href="gnutls-libtasn1.html#ASN1-ELEMENT-NOT-FOUND--CAPS" title="ASN1_ELEMENT_NOT_FOUND"><code class="literal">ASN1_ELEMENT_NOT_FOUND</code></a>, it means that this element wasn't present
1045
 
in the der encoding that created the structure.  The first element
1046
 
of a SEQUENCE_OF or SET_OF is named "?1". The second one "?2" and
1047
 
so on.
1048
 
</p>
1049
 
<p>
1050
 
INTEGER: VALUE will contain a two's complement form integer.
1051
 
</p>
1052
 
<p>
1053
 
           integer=-1  -&gt; value[0]=0xFF , len=1.
1054
 
           integer=1   -&gt; value[0]=0x01 , len=1.
1055
 
</p>
1056
 
<p>
1057
 
ENUMERATED: As INTEGER (but only with not negative numbers).
1058
 
</p>
1059
 
<p>
1060
 
BOOLEAN: VALUE will be the null terminated string "TRUE" or
1061
 
  "FALSE" and LEN=5 or LEN=6.
1062
 
</p>
1063
 
<p>
1064
 
OBJECT IDENTIFIER: VALUE will be a null terminated string with
1065
 
  each number separated by a dot (i.e. "1.2.3.543.1").
1066
 
</p>
1067
 
<p>
1068
 
                     LEN = strlen(VALUE)+1
1069
 
</p>
1070
 
<p>
1071
 
UTCTime: VALUE will be a null terminated string in one of these
1072
 
  formats: "YYMMDDhhmmss+hh'mm'" or "YYMMDDhhmmss-hh'mm'".
1073
 
  LEN=strlen(VALUE)+1.
1074
 
</p>
1075
 
<p>
1076
 
GeneralizedTime: VALUE will be a null terminated string in the
1077
 
  same format used to set the value.
1078
 
</p>
1079
 
<p>
1080
 
OCTET STRING: VALUE will contain the octet string and LEN will be
1081
 
  the number of octets.
1082
 
</p>
1083
 
<p>
1084
 
GeneralString: VALUE will contain the generalstring and LEN will
1085
 
  be the number of octets.
1086
 
</p>
1087
 
<p>
1088
 
BIT STRING: VALUE will contain the bit string organized by bytes
1089
 
  and LEN will be the number of bits.
1090
 
</p>
1091
 
<p>
1092
 
CHOICE: If NAME indicates a choice type, VALUE will specify the
1093
 
  alternative selected.
1094
 
</p>
1095
 
<p>
1096
 
ANY: If NAME indicates an any type, VALUE will indicate the DER
1097
 
  encoding of the structure actually used.</p>
 
858
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_read_value                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> root</code></em>,
 
859
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
860
                                                         <em class="parameter"><code><span class="type">void</span> *ivalue</code></em>,
 
861
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);</pre>
1098
862
<p>
1099
863
</p>
1100
864
<div class="variablelist"><table border="0">
1102
866
<tbody>
1103
867
<tr>
1104
868
<td><p><span class="term"><em class="parameter"><code>root</code></em> :</span></p></td>
1105
 
<td> pointer to a structure.
 
869
<td>
1106
870
</td>
1107
871
</tr>
1108
872
<tr>
1109
873
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1110
 
<td> the name of the element inside a structure that you want to read.
 
874
<td>
1111
875
</td>
1112
876
</tr>
1113
877
<tr>
1114
878
<td><p><span class="term"><em class="parameter"><code>ivalue</code></em> :</span></p></td>
1115
 
<td> vector that will contain the element's content, must be a
1116
 
  pointer to memory cells already allocated.
 
879
<td>
1117
880
</td>
1118
881
</tr>
1119
882
<tr>
1120
883
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1121
 
<td> number of bytes of *value: value[0]..value[len-1]. Initialy
1122
 
  holds the sizeof value.
 
884
<td>
1123
885
</td>
1124
886
</tr>
1125
887
<tr>
1126
888
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1127
889
<td>
1128
 
 
1129
 
  ASN1_SUCCESS: Set value OK.
1130
 
 
1131
 
  ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
1132
 
 
1133
 
  ASN1_VALUE_NOT_FOUND: There isn't any value for the element selected.
1134
 
 
1135
 
  ASN1_MEM_ERROR: The value vector isn't big enough to store the result.
1136
 
  In this case LEN will contain the number of bytes needed.
1137
 
 
1138
890
</td>
1139
891
</tr>
1140
892
</tbody>
1143
895
<hr>
1144
896
<div class="refsect2" title="asn1_number_of_elements ()">
1145
897
<a name="asn1-number-of-elements"></a><h3>asn1_number_of_elements ()</h3>
1146
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_number_of_elements             (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
1147
 
                                                         const char *name,
1148
 
                                                         int *num);</pre>
1149
 
<p>
1150
 
Counts the number of elements of a sub-structure called NAME with
1151
 
names equal to "?1","?2", ...</p>
 
898
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_number_of_elements             (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
899
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
900
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *num</code></em>);</pre>
1152
901
<p>
1153
902
</p>
1154
903
<div class="variablelist"><table border="0">
1156
905
<tbody>
1157
906
<tr>
1158
907
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1159
 
<td> pointer to the root of an ASN1 structure.
 
908
<td>
1160
909
</td>
1161
910
</tr>
1162
911
<tr>
1163
912
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1164
 
<td> the name of a sub-structure of ROOT.
 
913
<td>
1165
914
</td>
1166
915
</tr>
1167
916
<tr>
1168
917
<td><p><span class="term"><em class="parameter"><code>num</code></em> :</span></p></td>
1169
 
<td> pointer to an integer where the result will be stored
 
918
<td>
1170
919
</td>
1171
920
</tr>
1172
921
<tr>
1173
922
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1174
923
<td>
1175
 
 
1176
 
 ASN1_SUCCESS: Creation OK.
1177
 
 
1178
 
 ASN1_ELEMENT_NOT_FOUND: NAME isn't known.
1179
 
 
1180
 
 ASN1_GENERIC_ERROR: Pointer num equal to NULL.
1181
 
 
1182
924
</td>
1183
925
</tr>
1184
926
</tbody>
1187
929
<hr>
1188
930
<div class="refsect2" title="asn1_der_coding ()">
1189
931
<a name="asn1-der-coding"></a><h3>asn1_der_coding ()</h3>
1190
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_der_coding                     (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
1191
 
                                                         const char *name,
1192
 
                                                         void *ider,
1193
 
                                                         int *len,
1194
 
                                                         char *ErrorDescription);</pre>
1195
 
<p>
1196
 
Creates the DER encoding for the NAME structure (inside *POINTER
1197
 
structure).</p>
 
932
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_der_coding                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
933
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
934
                                                         <em class="parameter"><code><span class="type">void</span> *ider</code></em>,
 
935
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>,
 
936
                                                         <em class="parameter"><code><span class="type">char</span> *ErrorDescription</code></em>);</pre>
1198
937
<p>
1199
938
</p>
1200
939
<div class="variablelist"><table border="0">
1202
941
<tbody>
1203
942
<tr>
1204
943
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1205
 
<td> pointer to an ASN1 element
 
944
<td>
1206
945
</td>
1207
946
</tr>
1208
947
<tr>
1209
948
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1210
 
<td> the name of the structure you want to encode (it must be
1211
 
  inside *POINTER).
 
949
<td>
1212
950
</td>
1213
951
</tr>
1214
952
<tr>
1215
953
<td><p><span class="term"><em class="parameter"><code>ider</code></em> :</span></p></td>
1216
 
<td> vector that will contain the DER encoding. DER must be a
1217
 
  pointer to memory cells already allocated.
 
954
<td>
1218
955
</td>
1219
956
</tr>
1220
957
<tr>
1221
958
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1222
 
<td> number of bytes of *<em class="parameter"><code>ider</code></em>: <em class="parameter"><code>ider</code></em>[0]..<em class="parameter"><code>ider</code></em>[len-1], Initialy
1223
 
  holds the sizeof of der vector.
 
959
<td>
1224
960
</td>
1225
961
</tr>
1226
962
<tr>
1227
963
<td><p><span class="term"><em class="parameter"><code>ErrorDescription</code></em> :</span></p></td>
1228
 
<td> return the error description or an empty
1229
 
  string if success.
 
964
<td>
1230
965
</td>
1231
966
</tr>
1232
967
<tr>
1233
968
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1234
969
<td>
1235
 
 
1236
 
  ASN1_SUCCESS: DER encoding OK.
1237
 
 
1238
 
  ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
1239
 
 
1240
 
  ASN1_VALUE_NOT_FOUND: There is an element without a value.
1241
 
 
1242
 
  ASN1_MEM_ERROR: <em class="parameter"><code>ider</code></em> vector isn't big enough. Also in this case
1243
 
    LEN will contain the length needed.
1244
 
 
1245
970
</td>
1246
971
</tr>
1247
972
</tbody>
1250
975
<hr>
1251
976
<div class="refsect2" title="asn1_der_decoding ()">
1252
977
<a name="asn1-der-decoding"></a><h3>asn1_der_decoding ()</h3>
1253
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_der_decoding                   (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element,
1254
 
                                                         const void *ider,
1255
 
                                                         int len,
1256
 
                                                         char *errorDescription);</pre>
1257
 
<p>
1258
 
Fill the structure *ELEMENT with values of a DER encoding
1259
 
string. The sructure must just be created with function
1260
 
'create_stucture'.  If an error occurs during the decoding
1261
 
procedure, the *ELEMENT is deleted and set equal to
1262
 
<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE-EMPTY--CAPS" title="ASN1_TYPE_EMPTY"><code class="literal">ASN1_TYPE_EMPTY</code></a>.</p>
 
978
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_der_decoding                   (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>,
 
979
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
980
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
981
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);</pre>
1263
982
<p>
1264
983
</p>
1265
984
<div class="variablelist"><table border="0">
1267
986
<tbody>
1268
987
<tr>
1269
988
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1270
 
<td> pointer to an ASN1 structure.
 
989
<td>
1271
990
</td>
1272
991
</tr>
1273
992
<tr>
1274
993
<td><p><span class="term"><em class="parameter"><code>ider</code></em> :</span></p></td>
1275
 
<td> vector that contains the DER encoding.
 
994
<td>
1276
995
</td>
1277
996
</tr>
1278
997
<tr>
1279
998
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1280
 
<td> number of bytes of *<em class="parameter"><code>ider</code></em>: <em class="parameter"><code>ider</code></em>[0]..<em class="parameter"><code>ider</code></em>[len-1].
 
999
<td>
1281
1000
</td>
1282
1001
</tr>
1283
1002
<tr>
1284
1003
<td><p><span class="term"><em class="parameter"><code>errorDescription</code></em> :</span></p></td>
1285
 
<td> null-terminated string contains details when an
1286
 
  error occurred.
 
1004
<td>
1287
1005
</td>
1288
1006
</tr>
1289
1007
<tr>
1290
1008
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1291
1009
<td>
1292
 
 
1293
 
  ASN1_SUCCESS: DER encoding OK.
1294
 
 
1295
 
  ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE_EMPTY.
1296
 
 
1297
 
  ASN1_TAG_ERROR,ASN1_DER_ERROR: The der encoding doesn't match
1298
 
    the structure NAME. *ELEMENT deleted.
1299
1010
</td>
1300
1011
</tr>
1301
1012
</tbody>
1304
1015
<hr>
1305
1016
<div class="refsect2" title="asn1_der_decoding_element ()">
1306
1017
<a name="asn1-der-decoding-element"></a><h3>asn1_der_decoding_element ()</h3>
1307
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_der_decoding_element           (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *structure,
1308
 
                                                         const char *elementName,
1309
 
                                                         const void *ider,
1310
 
                                                         int len,
1311
 
                                                         char *errorDescription);</pre>
1312
 
<p>
1313
 
Fill the element named ELEMENTNAME with values of a DER encoding
1314
 
string.  The sructure must just be created with function
1315
 
'create_stucture'.  The DER vector must contain the encoding
1316
 
string of the whole STRUCTURE.  If an error occurs during the
1317
 
decoding procedure, the *STRUCTURE is deleted and set equal to
1318
 
<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE-EMPTY--CAPS" title="ASN1_TYPE_EMPTY"><code class="literal">ASN1_TYPE_EMPTY</code></a>.</p>
 
1018
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_der_decoding_element           (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *structure</code></em>,
 
1019
                                                         <em class="parameter"><code>const <span class="type">char</span> *elementName</code></em>,
 
1020
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
1021
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
1022
                                                         <em class="parameter"><code><span class="type">char</span> *errorDescription</code></em>);</pre>
1319
1023
<p>
1320
1024
</p>
1321
1025
<div class="variablelist"><table border="0">
1323
1027
<tbody>
1324
1028
<tr>
1325
1029
<td><p><span class="term"><em class="parameter"><code>structure</code></em> :</span></p></td>
1326
 
<td> pointer to an ASN1 structure
 
1030
<td>
1327
1031
</td>
1328
1032
</tr>
1329
1033
<tr>
1330
1034
<td><p><span class="term"><em class="parameter"><code>elementName</code></em> :</span></p></td>
1331
 
<td> name of the element to fill
 
1035
<td>
1332
1036
</td>
1333
1037
</tr>
1334
1038
<tr>
1335
1039
<td><p><span class="term"><em class="parameter"><code>ider</code></em> :</span></p></td>
1336
 
<td> vector that contains the DER encoding of the whole structure.
 
1040
<td>
1337
1041
</td>
1338
1042
</tr>
1339
1043
<tr>
1340
1044
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1341
 
<td> number of bytes of *der: der[0]..der[len-1]
 
1045
<td>
1342
1046
</td>
1343
1047
</tr>
1344
1048
<tr>
1345
1049
<td><p><span class="term"><em class="parameter"><code>errorDescription</code></em> :</span></p></td>
1346
 
<td> null-terminated string contains details when an
1347
 
  error occurred.
 
1050
<td>
1348
1051
</td>
1349
1052
</tr>
1350
1053
<tr>
1351
1054
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1352
1055
<td>
1353
 
 
1354
 
  ASN1_SUCCESS: DER encoding OK.
1355
 
 
1356
 
  ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE_EMPTY or
1357
 
    elementName == NULL.
1358
 
 
1359
 
  ASN1_TAG_ERROR,ASN1_DER_ERROR: The der encoding doesn't match
1360
 
  the structure STRUCTURE. *ELEMENT deleted.
1361
 
 
1362
1056
</td>
1363
1057
</tr>
1364
1058
</tbody>
1367
1061
<hr>
1368
1062
<div class="refsect2" title="asn1_der_decoding_startEnd ()">
1369
1063
<a name="asn1-der-decoding-startEnd"></a><h3>asn1_der_decoding_startEnd ()</h3>
1370
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_der_decoding_startEnd          (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> element,
1371
 
                                                         const void *ider,
1372
 
                                                         int len,
1373
 
                                                         const char *name_element,
1374
 
                                                         int *start,
1375
 
                                                         int *end);</pre>
1376
 
<p>
1377
 
Find the start and end point of an element in a DER encoding
1378
 
string. I mean that if you have a der encoding and you have
1379
 
already used the function "asn1_der_decoding" to fill a structure,
1380
 
it may happen that you want to find the piece of string concerning
1381
 
an element of the structure.
1382
 
</p>
1383
 
<p>
1384
 
Example: the sequence "tbsCertificate" inside an X509 certificate.</p>
 
1064
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_der_decoding_startEnd          (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> element</code></em>,
 
1065
                                                         <em class="parameter"><code>const <span class="type">void</span> *ider</code></em>,
 
1066
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
1067
                                                         <em class="parameter"><code>const <span class="type">char</span> *name_element</code></em>,
 
1068
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *start</code></em>,
 
1069
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *end</code></em>);</pre>
1385
1070
<p>
1386
1071
</p>
1387
1072
<div class="variablelist"><table border="0">
1389
1074
<tbody>
1390
1075
<tr>
1391
1076
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1392
 
<td> pointer to an ASN1 element
 
1077
<td>
1393
1078
</td>
1394
1079
</tr>
1395
1080
<tr>
1396
1081
<td><p><span class="term"><em class="parameter"><code>ider</code></em> :</span></p></td>
1397
 
<td> vector that contains the DER encoding.
 
1082
<td>
1398
1083
</td>
1399
1084
</tr>
1400
1085
<tr>
1401
1086
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1402
 
<td> number of bytes of *<em class="parameter"><code>ider</code></em>: <em class="parameter"><code>ider</code></em>[0]..<em class="parameter"><code>ider</code></em>[len-1]
 
1087
<td>
1403
1088
</td>
1404
1089
</tr>
1405
1090
<tr>
1406
1091
<td><p><span class="term"><em class="parameter"><code>name_element</code></em> :</span></p></td>
1407
 
<td> an element of NAME structure.
 
1092
<td>
1408
1093
</td>
1409
1094
</tr>
1410
1095
<tr>
1411
1096
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
1412
 
<td> the position of the first byte of NAME_ELEMENT decoding
1413
 
  (<em class="parameter"><code>ider</code></em>[*start])
 
1097
<td>
1414
1098
</td>
1415
1099
</tr>
1416
1100
<tr>
1417
1101
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
1418
 
<td> the position of the last byte of NAME_ELEMENT decoding
1419
 
 (<em class="parameter"><code>ider</code></em>[*end])
 
1102
<td>
1420
1103
</td>
1421
1104
</tr>
1422
1105
<tr>
1423
1106
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1424
1107
<td>
1425
 
 
1426
 
  ASN1_SUCCESS: DER encoding OK.
1427
 
 
1428
 
  ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE EMPTY or
1429
 
  NAME_ELEMENT is not a valid element.
1430
 
 
1431
 
  ASN1_TAG_ERROR,ASN1_DER_ERROR: the der encoding doesn't match
1432
 
  the structure ELEMENT.
1433
 
 
1434
1108
</td>
1435
1109
</tr>
1436
1110
</tbody>
1439
1113
<hr>
1440
1114
<div class="refsect2" title="asn1_expand_any_defined_by ()">
1441
1115
<a name="asn1-expand-any-defined-by"></a><h3>asn1_expand_any_defined_by ()</h3>
1442
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_expand_any_defined_by          (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
1443
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element);</pre>
1444
 
<p>
1445
 
Expands every "ANY DEFINED BY" element of a structure created from
1446
 
a DER decoding process (asn1_der_decoding function). The element ANY
1447
 
must be defined by an OBJECT IDENTIFIER. The type used to expand
1448
 
the element ANY is the first one following the definition of
1449
 
the actual value of the OBJECT IDENTIFIER.</p>
 
1116
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_expand_any_defined_by          (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
1117
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>);</pre>
1450
1118
<p>
1451
1119
</p>
1452
1120
<div class="variablelist"><table border="0">
1454
1122
<tbody>
1455
1123
<tr>
1456
1124
<td><p><span class="term"><em class="parameter"><code>definitions</code></em> :</span></p></td>
1457
 
<td> ASN1 definitions
 
1125
<td>
1458
1126
</td>
1459
1127
</tr>
1460
1128
<tr>
1461
1129
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1462
 
<td> pointer to an ASN1 structure
 
1130
<td>
1463
1131
</td>
1464
1132
</tr>
1465
1133
<tr>
1466
1134
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1467
1135
<td>
1468
 
 
1469
 
  ASN1_SUCCESS: Substitution OK.
1470
 
 
1471
 
  ASN1_ERROR_TYPE_ANY: Some "ANY DEFINED BY" element couldn't be
1472
 
  expanded due to a problem in OBJECT_ID -&gt; TYPE association.
1473
 
 
1474
 
  other errors: Result of der decoding process.
1475
1136
</td>
1476
1137
</tr>
1477
1138
</tbody>
1480
1141
<hr>
1481
1142
<div class="refsect2" title="asn1_expand_octet_string ()">
1482
1143
<a name="asn1-expand-octet-string"></a><h3>asn1_expand_octet_string ()</h3>
1483
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_expand_octet_string            (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
1484
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> *element,
1485
 
                                                         const char *octetName,
1486
 
                                                         const char *objectName);</pre>
1487
 
<p>
1488
 
Expands an "OCTET STRING" element of a structure created from a
1489
 
DER decoding process (asn1_der_decoding function). The type used
1490
 
for expansion is the first one following the definition of the
1491
 
actual value of the OBJECT IDENTIFIER indicated by OBJECTNAME.</p>
 
1144
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_expand_octet_string            (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
1145
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> *element</code></em>,
 
1146
                                                         <em class="parameter"><code>const <span class="type">char</span> *octetName</code></em>,
 
1147
                                                         <em class="parameter"><code>const <span class="type">char</span> *objectName</code></em>);</pre>
1492
1148
<p>
1493
1149
</p>
1494
1150
<div class="variablelist"><table border="0">
1496
1152
<tbody>
1497
1153
<tr>
1498
1154
<td><p><span class="term"><em class="parameter"><code>definitions</code></em> :</span></p></td>
1499
 
<td> ASN1 definitions
 
1155
<td>
1500
1156
</td>
1501
1157
</tr>
1502
1158
<tr>
1503
1159
<td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
1504
 
<td> pointer to an ASN1 structure
 
1160
<td>
1505
1161
</td>
1506
1162
</tr>
1507
1163
<tr>
1508
1164
<td><p><span class="term"><em class="parameter"><code>octetName</code></em> :</span></p></td>
1509
 
<td> name of the OCTECT STRING field to expand.
 
1165
<td>
1510
1166
</td>
1511
1167
</tr>
1512
1168
<tr>
1513
1169
<td><p><span class="term"><em class="parameter"><code>objectName</code></em> :</span></p></td>
1514
 
<td> name of the OBJECT IDENTIFIER field to use to define
1515
 
   the type for expansion.
 
1170
<td>
1516
1171
</td>
1517
1172
</tr>
1518
1173
<tr>
1519
1174
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1520
1175
<td>
1521
 
 
1522
 
  ASN1_SUCCESS: Substitution OK.
1523
 
 
1524
 
  ASN1_ELEMENT_NOT_FOUND: OBJECTNAME or OCTETNAME are not correct.
1525
 
 
1526
 
  ASN1_VALUE_NOT_VALID: Wasn't possible to find the type to use
1527
 
      for expansion.
1528
 
 
1529
 
  other errors: result of der decoding process.
1530
1176
</td>
1531
1177
</tr>
1532
1178
</tbody>
1535
1181
<hr>
1536
1182
<div class="refsect2" title="asn1_read_tag ()">
1537
1183
<a name="asn1-read-tag"></a><h3>asn1_read_tag ()</h3>
1538
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_read_tag                       (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> root,
1539
 
                                                         const char *name,
1540
 
                                                         int *tagValue,
1541
 
                                                         int *classValue);</pre>
1542
 
<p>
1543
 
Returns the TAG and the CLASS of one element inside a structure.
1544
 
CLASS can have one of these constants: <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-APPLICATION--CAPS" title="ASN1_CLASS_APPLICATION"><code class="literal">ASN1_CLASS_APPLICATION</code></a>,
1545
 
<a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-UNIVERSAL--CAPS" title="ASN1_CLASS_UNIVERSAL"><code class="literal">ASN1_CLASS_UNIVERSAL</code></a>, <a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-PRIVATE--CAPS" title="ASN1_CLASS_PRIVATE"><code class="literal">ASN1_CLASS_PRIVATE</code></a> or
1546
 
<a class="link" href="gnutls-libtasn1.html#ASN1-CLASS-CONTEXT-SPECIFIC--CAPS" title="ASN1_CLASS_CONTEXT_SPECIFIC"><code class="literal">ASN1_CLASS_CONTEXT_SPECIFIC</code></a>.</p>
 
1184
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_read_tag                       (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> root</code></em>,
 
1185
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
 
1186
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *tagValue</code></em>,
 
1187
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *classValue</code></em>);</pre>
1547
1188
<p>
1548
1189
</p>
1549
1190
<div class="variablelist"><table border="0">
1551
1192
<tbody>
1552
1193
<tr>
1553
1194
<td><p><span class="term"><em class="parameter"><code>root</code></em> :</span></p></td>
1554
 
<td> pointer to a structure
 
1195
<td>
1555
1196
</td>
1556
1197
</tr>
1557
1198
<tr>
1558
1199
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1559
 
<td> the name of the element inside a structure.
 
1200
<td>
1560
1201
</td>
1561
1202
</tr>
1562
1203
<tr>
1563
1204
<td><p><span class="term"><em class="parameter"><code>tagValue</code></em> :</span></p></td>
1564
 
<td>  variable that will contain the TAG value.
 
1205
<td>
1565
1206
</td>
1566
1207
</tr>
1567
1208
<tr>
1568
1209
<td><p><span class="term"><em class="parameter"><code>classValue</code></em> :</span></p></td>
1569
 
<td> variable that will specify the TAG type.
 
1210
<td>
1570
1211
</td>
1571
1212
</tr>
1572
1213
<tr>
1573
1214
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1574
1215
<td>
1575
 
 
1576
 
  ASN1_SUCCESS: Set value OK.
1577
 
 
1578
 
  ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
1579
 
 
1580
1216
</td>
1581
1217
</tr>
1582
1218
</tbody>
1585
1221
<hr>
1586
1222
<div class="refsect2" title="asn1_find_structure_from_oid ()">
1587
1223
<a name="asn1-find-structure-from-oid"></a><h3>asn1_find_structure_from_oid ()</h3>
1588
 
<pre class="programlisting">const char *        asn1_find_structure_from_oid        (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> definitions,
1589
 
                                                         const char *oidValue);</pre>
1590
 
<p>
1591
 
Search the structure that is defined just after an OID definition.</p>
 
1224
<pre class="programlisting">const <span class="returnvalue">char</span> *        asn1_find_structure_from_oid        (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> definitions</code></em>,
 
1225
                                                         <em class="parameter"><code>const <span class="type">char</span> *oidValue</code></em>);</pre>
1592
1226
<p>
1593
1227
</p>
1594
1228
<div class="variablelist"><table border="0">
1596
1230
<tbody>
1597
1231
<tr>
1598
1232
<td><p><span class="term"><em class="parameter"><code>definitions</code></em> :</span></p></td>
1599
 
<td> ASN1 definitions
 
1233
<td>
1600
1234
</td>
1601
1235
</tr>
1602
1236
<tr>
1603
1237
<td><p><span class="term"><em class="parameter"><code>oidValue</code></em> :</span></p></td>
1604
 
<td> value of the OID to search (e.g. "1.2.3.4").
 
1238
<td>
1605
1239
</td>
1606
1240
</tr>
1607
1241
<tr>
1608
1242
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1609
 
<td> NULL when OIDVALUE not found, otherwise the pointer to a
1610
 
  constant string that contains the element name defined just
1611
 
  after the OID.
1612
 
 
 
1243
<td>
1613
1244
</td>
1614
1245
</tr>
1615
1246
</tbody>
1618
1249
<hr>
1619
1250
<div class="refsect2" title="asn1_check_version ()">
1620
1251
<a name="asn1-check-version"></a><h3>asn1_check_version ()</h3>
1621
 
<pre class="programlisting">const char *        asn1_check_version                  (const char *req_version);</pre>
1622
 
<p>
1623
 
Check that the version of the library is at minimum the
1624
 
requested one and return the version string; return <code class="literal">NULL</code> if the
1625
 
condition is not satisfied.  If a <code class="literal">NULL</code> is passed to this function,
1626
 
no check is done, but the version string is simply returned.
1627
 
</p>
1628
 
<p>
1629
 
See <a class="link" href="gnutls-libtasn1.html#ASN1-VERSION--CAPS" title="ASN1_VERSION"><code class="literal">ASN1_VERSION</code></a> for a suitable <em class="parameter"><code>req_version</code></em> string.</p>
 
1252
<pre class="programlisting">const <span class="returnvalue">char</span> *        asn1_check_version                  (<em class="parameter"><code>const <span class="type">char</span> *req_version</code></em>);</pre>
1630
1253
<p>
1631
1254
</p>
1632
1255
<div class="variablelist"><table border="0">
1634
1257
<tbody>
1635
1258
<tr>
1636
1259
<td><p><span class="term"><em class="parameter"><code>req_version</code></em> :</span></p></td>
1637
 
<td> Required version number, or NULL.
 
1260
<td>
1638
1261
</td>
1639
1262
</tr>
1640
1263
<tr>
1641
1264
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1642
 
<td> Version string of run-time library, or <code class="literal">NULL</code> if the
1643
 
  run-time library does not meet the required version number.
 
1265
<td>
1644
1266
</td>
1645
1267
</tr>
1646
1268
</tbody>
1649
1271
<hr>
1650
1272
<div class="refsect2" title="asn1_strerror ()">
1651
1273
<a name="asn1-strerror"></a><h3>asn1_strerror ()</h3>
1652
 
<pre class="programlisting">const char *        asn1_strerror                       (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);</pre>
1653
 
<p>
1654
 
This function is similar to strerror.  The only difference is that
1655
 
it accepts an error (number) returned by a libtasn1 function.
1656
 
</p>
1657
 
<p>
1658
 
This function replaces <a class="link" href="gnutls-libtasn1.html#libtasn1-strerror" title="libtasn1_strerror ()"><code class="function">libtasn1_strerror()</code></a> in older libtasn1.</p>
 
1274
<pre class="programlisting">const <span class="returnvalue">char</span> *        asn1_strerror                       (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);</pre>
1659
1275
<p>
1660
1276
</p>
1661
1277
<div class="variablelist"><table border="0">
1663
1279
<tbody>
1664
1280
<tr>
1665
1281
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1666
 
<td> is an error returned by a libtasn1 function.
 
1282
<td>
1667
1283
</td>
1668
1284
</tr>
1669
1285
<tr>
1670
1286
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1671
 
<td> Pointer to static zero-terminated string describing error
1672
 
  code.
1673
 
 
 
1287
<td>
1674
1288
</td>
1675
1289
</tr>
1676
1290
</tbody>
1677
1291
</table></div>
1678
 
<p class="since">Since 1.6</p>
1679
1292
</div>
1680
1293
<hr>
1681
1294
<div class="refsect2" title="asn1_perror ()">
1682
1295
<a name="asn1-perror"></a><h3>asn1_perror ()</h3>
1683
 
<pre class="programlisting">void                asn1_perror                         (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);</pre>
1684
 
<p>
1685
 
This function is like <code class="function">perror()</code>.  The only difference is that it
1686
 
accepts an error returned by a libtasn1 function.
1687
 
</p>
1688
 
<p>
1689
 
This function replaces <a class="link" href="gnutls-libtasn1.html#libtasn1-perror" title="libtasn1_perror ()"><code class="function">libtasn1_perror()</code></a> in older libtasn1.</p>
 
1296
<pre class="programlisting"><span class="returnvalue">void</span>                asn1_perror                         (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);</pre>
1690
1297
<p>
1691
1298
</p>
1692
1299
<div class="variablelist"><table border="0">
1693
1300
<col align="left" valign="top">
1694
1301
<tbody><tr>
1695
1302
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1696
 
<td> is an error returned by a libtasn1 function.
 
1303
<td>
1697
1304
</td>
1698
1305
</tr></tbody>
1699
1306
</table></div>
1700
 
<p class="since">Since 1.6</p>
1701
1307
</div>
1702
1308
<hr>
1703
1309
<div class="refsect2" title="asn1_get_tag_der ()">
1704
1310
<a name="asn1-get-tag-der"></a><h3>asn1_get_tag_der ()</h3>
1705
 
<pre class="programlisting">int                 asn1_get_tag_der                    (unsigned char *der,
1706
 
                                                         int der_len,
1707
 
                                                         unsigned char *cls,
1708
 
                                                         int *len,
1709
 
                                                         unsigned long *tag);</pre>
 
1311
<pre class="programlisting"><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="returnvalue">int</span></a>                 asn1_get_tag_der                    (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1312
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
1313
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *cls</code></em>,
 
1314
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>,
 
1315
                                                         <em class="parameter"><code>unsigned <span class="type">long</span> *tag</code></em>);</pre>
1710
1316
<p>
1711
1317
Decode the class and TAG from DER code.</p>
1712
 
<p>
1713
 
</p>
1714
1318
<div class="variablelist"><table border="0">
1715
1319
<col align="left" valign="top">
1716
1320
<tbody>
1717
1321
<tr>
1718
1322
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
1719
 
<td> DER data to decode.
 
1323
<td>DER data to decode.
1720
1324
</td>
1721
1325
</tr>
1722
1326
<tr>
1723
1327
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
1724
 
<td> Length of DER data to decode.
 
1328
<td>Length of DER data to decode.
1725
1329
</td>
1726
1330
</tr>
1727
1331
<tr>
1728
1332
<td><p><span class="term"><em class="parameter"><code>cls</code></em> :</span></p></td>
1729
 
<td> Output variable containing decoded class.
 
1333
<td>Output variable containing decoded class.
1730
1334
</td>
1731
1335
</tr>
1732
1336
<tr>
1733
1337
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1734
 
<td> Output variable containing the length of the DER TAG data.
 
1338
<td>Output variable containing the length of the DER TAG data.
1735
1339
</td>
1736
1340
</tr>
1737
1341
<tr>
1738
1342
<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
1739
 
<td> Output variable containing the decoded tag.
 
1343
<td>Output variable containing the decoded tag.
1740
1344
</td>
1741
1345
</tr>
1742
1346
<tr>
1750
1354
<hr>
1751
1355
<div class="refsect2" title="asn1_octet_der ()">
1752
1356
<a name="asn1-octet-der"></a><h3>asn1_octet_der ()</h3>
1753
 
<pre class="programlisting">void                asn1_octet_der                      (unsigned char *str,
1754
 
                                                         int str_len,
1755
 
                                                         unsigned char *der,
1756
 
                                                         int *der_len);</pre>
 
1357
<pre class="programlisting"><span class="returnvalue">void</span>                asn1_octet_der                      (<em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
1358
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_len</code></em>,
 
1359
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1360
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *der_len</code></em>);</pre>
1757
1361
<p>
1758
1362
Creates the DER coding for an OCTET type (length included).</p>
1759
 
<p>
1760
 
</p>
1761
1363
<div class="variablelist"><table border="0">
1762
1364
<col align="left" valign="top">
1763
1365
<tbody>
1764
1366
<tr>
1765
1367
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
1766
 
<td> OCTET string.
 
1368
<td>OCTET string.
1767
1369
</td>
1768
1370
</tr>
1769
1371
<tr>
1770
1372
<td><p><span class="term"><em class="parameter"><code>str_len</code></em> :</span></p></td>
1771
 
<td> STR length (str[0]..str[str_len-1]).
 
1373
<td>STR length (str[0]..str[str_len-1]).
1772
1374
</td>
1773
1375
</tr>
1774
1376
<tr>
1775
1377
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
1776
 
<td> string returned.
 
1378
<td>string returned.
1777
1379
</td>
1778
1380
</tr>
1779
1381
<tr>
1780
1382
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
1781
 
<td> number of meaningful bytes of DER (der[0]..der[ans_len-1]).
 
1383
<td>number of meaningful bytes of DER (der[0]..der[ans_len-1]).
1782
1384
</td>
1783
1385
</tr>
1784
1386
</tbody>
1787
1389
<hr>
1788
1390
<div class="refsect2" title="asn1_get_octet_der ()">
1789
1391
<a name="asn1-get-octet-der"></a><h3>asn1_get_octet_der ()</h3>
1790
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_get_octet_der                  (unsigned char *der,
1791
 
                                                         int der_len,
1792
 
                                                         int *ret_len,
1793
 
                                                         unsigned char *str,
1794
 
                                                         int str_size,
1795
 
                                                         int *str_len);</pre>
 
1392
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_get_octet_der                  (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1393
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
1394
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ret_len</code></em>,
 
1395
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
1396
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_size</code></em>,
 
1397
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *str_len</code></em>);</pre>
1796
1398
<p>
1797
1399
Extract an OCTET SEQUENCE from DER data.</p>
1798
 
<p>
1799
 
</p>
1800
1400
<div class="variablelist"><table border="0">
1801
1401
<col align="left" valign="top">
1802
1402
<tbody>
1803
1403
<tr>
1804
1404
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
1805
 
<td> DER data to decode containing the OCTET SEQUENCE.
 
1405
<td>DER data to decode containing the OCTET SEQUENCE.
1806
1406
</td>
1807
1407
</tr>
1808
1408
<tr>
1809
1409
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
1810
 
<td> Length of DER data to decode.
 
1410
<td>Length of DER data to decode.
1811
1411
</td>
1812
1412
</tr>
1813
1413
<tr>
1814
1414
<td><p><span class="term"><em class="parameter"><code>ret_len</code></em> :</span></p></td>
1815
 
<td> Output variable containing the length of the DER data.
 
1415
<td>Output variable containing the length of the DER data.
1816
1416
</td>
1817
1417
</tr>
1818
1418
<tr>
1819
1419
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
1820
 
<td> Pre-allocated output buffer to put decoded OCTET SEQUENCE in.
 
1420
<td>Pre-allocated output buffer to put decoded OCTET SEQUENCE in.
1821
1421
</td>
1822
1422
</tr>
1823
1423
<tr>
1824
1424
<td><p><span class="term"><em class="parameter"><code>str_size</code></em> :</span></p></td>
1825
 
<td> Length of pre-allocated output buffer.
 
1425
<td>Length of pre-allocated output buffer.
1826
1426
</td>
1827
1427
</tr>
1828
1428
<tr>
1829
1429
<td><p><span class="term"><em class="parameter"><code>str_len</code></em> :</span></p></td>
1830
 
<td> Output variable containing the length of the OCTET SEQUENCE.
 
1430
<td>Output variable containing the length of the OCTET SEQUENCE.
1831
1431
</td>
1832
1432
</tr>
1833
1433
<tr>
1841
1441
<hr>
1842
1442
<div class="refsect2" title="asn1_bit_der ()">
1843
1443
<a name="asn1-bit-der"></a><h3>asn1_bit_der ()</h3>
1844
 
<pre class="programlisting">void                asn1_bit_der                        (unsigned char *str,
1845
 
                                                         int bit_len,
1846
 
                                                         unsigned char *der,
1847
 
                                                         int *der_len);</pre>
 
1444
<pre class="programlisting"><span class="returnvalue">void</span>                asn1_bit_der                        (<em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
1445
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> bit_len</code></em>,
 
1446
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1447
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *der_len</code></em>);</pre>
1848
1448
<p>
1849
1449
Creates the DER coding for a BIT STRING type (length and pad
1850
1450
included).</p>
1851
 
<p>
1852
 
</p>
1853
1451
<div class="variablelist"><table border="0">
1854
1452
<col align="left" valign="top">
1855
1453
<tbody>
1856
1454
<tr>
1857
1455
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
1858
 
<td> BIT string.
 
1456
<td>BIT string.
1859
1457
</td>
1860
1458
</tr>
1861
1459
<tr>
1862
1460
<td><p><span class="term"><em class="parameter"><code>bit_len</code></em> :</span></p></td>
1863
 
<td> number of meaningful bits in STR.
 
1461
<td>number of meaningful bits in STR.
1864
1462
</td>
1865
1463
</tr>
1866
1464
<tr>
1867
1465
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
1868
 
<td> string returned.
 
1466
<td>string returned.
1869
1467
</td>
1870
1468
</tr>
1871
1469
<tr>
1872
1470
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
1873
 
<td> number of meaningful bytes of DER
 
1471
<td>number of meaningful bytes of DER
1874
1472
  (der[0]..der[ans_len-1]).
1875
1473
</td>
1876
1474
</tr>
1880
1478
<hr>
1881
1479
<div class="refsect2" title="asn1_get_bit_der ()">
1882
1480
<a name="asn1-get-bit-der"></a><h3>asn1_get_bit_der ()</h3>
1883
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_get_bit_der                    (unsigned char *der,
1884
 
                                                         int der_len,
1885
 
                                                         int *ret_len,
1886
 
                                                         unsigned char *str,
1887
 
                                                         int str_size,
1888
 
                                                         int *bit_len);</pre>
 
1481
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_get_bit_der                    (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1482
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
1483
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ret_len</code></em>,
 
1484
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *str</code></em>,
 
1485
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> str_size</code></em>,
 
1486
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *bit_len</code></em>);</pre>
1889
1487
<p>
1890
1488
Extract a BIT SEQUENCE from DER data.</p>
1891
 
<p>
1892
 
</p>
1893
1489
<div class="variablelist"><table border="0">
1894
1490
<col align="left" valign="top">
1895
1491
<tbody>
1896
1492
<tr>
1897
1493
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
1898
 
<td> DER data to decode containing the BIT SEQUENCE.
 
1494
<td>DER data to decode containing the BIT SEQUENCE.
1899
1495
</td>
1900
1496
</tr>
1901
1497
<tr>
1902
1498
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
1903
 
<td> Length of DER data to decode.
 
1499
<td>Length of DER data to decode.
1904
1500
</td>
1905
1501
</tr>
1906
1502
<tr>
1907
1503
<td><p><span class="term"><em class="parameter"><code>ret_len</code></em> :</span></p></td>
1908
 
<td> Output variable containing the length of the DER data.
 
1504
<td>Output variable containing the length of the DER data.
1909
1505
</td>
1910
1506
</tr>
1911
1507
<tr>
1912
1508
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
1913
 
<td> Pre-allocated output buffer to put decoded BIT SEQUENCE in.
 
1509
<td>Pre-allocated output buffer to put decoded BIT SEQUENCE in.
1914
1510
</td>
1915
1511
</tr>
1916
1512
<tr>
1917
1513
<td><p><span class="term"><em class="parameter"><code>str_size</code></em> :</span></p></td>
1918
 
<td> Length of pre-allocated output buffer.
 
1514
<td>Length of pre-allocated output buffer.
1919
1515
</td>
1920
1516
</tr>
1921
1517
<tr>
1922
1518
<td><p><span class="term"><em class="parameter"><code>bit_len</code></em> :</span></p></td>
1923
 
<td> Output variable containing the size of the BIT SEQUENCE.
 
1519
<td>Output variable containing the size of the BIT SEQUENCE.
1924
1520
</td>
1925
1521
</tr>
1926
1522
<tr>
1932
1528
</table></div>
1933
1529
</div>
1934
1530
<hr>
 
1531
<div class="refsect2" title="asn1_get_length_der ()">
 
1532
<a name="asn1-get-length-der"></a><h3>asn1_get_length_der ()</h3>
 
1533
<pre class="programlisting">signed <span class="returnvalue">long</span>         asn1_get_length_der                 (<em class="parameter"><code>unsigned <span class="type">char</span> *der</code></em>,
 
1534
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> der_len</code></em>,
 
1535
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);</pre>
 
1536
<p>
 
1537
Extract a length field from DER data.</p>
 
1538
<div class="variablelist"><table border="0">
 
1539
<col align="left" valign="top">
 
1540
<tbody>
 
1541
<tr>
 
1542
<td><p><span class="term"><em class="parameter"><code>der</code></em> :</span></p></td>
 
1543
<td>DER data to decode.
 
1544
</td>
 
1545
</tr>
 
1546
<tr>
 
1547
<td><p><span class="term"><em class="parameter"><code>der_len</code></em> :</span></p></td>
 
1548
<td>Length of DER data to decode.
 
1549
</td>
 
1550
</tr>
 
1551
<tr>
 
1552
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
 
1553
<td>Output variable containing the length of the DER length field.
 
1554
</td>
 
1555
</tr>
 
1556
<tr>
 
1557
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1558
<td> Return the decoded length value, or -1 on indefinite
 
1559
  length, or -2 when the value was too big.
 
1560
</td>
 
1561
</tr>
 
1562
</tbody>
 
1563
</table></div>
 
1564
</div>
 
1565
<hr>
 
1566
<div class="refsect2" title="asn1_get_length_ber ()">
 
1567
<a name="asn1-get-length-ber"></a><h3>asn1_get_length_ber ()</h3>
 
1568
<pre class="programlisting">signed <span class="returnvalue">long</span>         asn1_get_length_ber                 (<em class="parameter"><code>unsigned <span class="type">char</span> *ber</code></em>,
 
1569
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> ber_len</code></em>,
 
1570
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *len</code></em>);</pre>
 
1571
<p>
 
1572
Extract a length field from BER data.  The difference to
 
1573
<a class="link" href="gnutls-libtasn1.html#asn1-get-length-der" title="asn1_get_length_der ()"><code class="function">asn1_get_length_der()</code></a> is that this function will return a length
 
1574
even if the value has indefinite encoding.</p>
 
1575
<div class="variablelist"><table border="0">
 
1576
<col align="left" valign="top">
 
1577
<tbody>
 
1578
<tr>
 
1579
<td><p><span class="term"><em class="parameter"><code>ber</code></em> :</span></p></td>
 
1580
<td>BER data to decode.
 
1581
</td>
 
1582
</tr>
 
1583
<tr>
 
1584
<td><p><span class="term"><em class="parameter"><code>ber_len</code></em> :</span></p></td>
 
1585
<td>Length of BER data to decode.
 
1586
</td>
 
1587
</tr>
 
1588
<tr>
 
1589
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
 
1590
<td>Output variable containing the length of the BER length field.
 
1591
</td>
 
1592
</tr>
 
1593
<tr>
 
1594
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1595
<td> Return the decoded length value, or negative value
 
1596
  when the value was too big.
 
1597
 
 
1598
</td>
 
1599
</tr>
 
1600
</tbody>
 
1601
</table></div>
 
1602
<p class="since">Since 2.0</p>
 
1603
</div>
 
1604
<hr>
1935
1605
<div class="refsect2" title="asn1_length_der ()">
1936
1606
<a name="asn1-length-der"></a><h3>asn1_length_der ()</h3>
1937
 
<pre class="programlisting">void                asn1_length_der                     (unsigned long int len,
1938
 
                                                         unsigned char *ans,
1939
 
                                                         int *ans_len);</pre>
 
1607
<pre class="programlisting"><span class="returnvalue">void</span>                asn1_length_der                     (<em class="parameter"><code>unsigned long <a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> len</code></em>,
 
1608
                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *ans</code></em>,
 
1609
                                                         <em class="parameter"><code><a class="link" href="gnutls-crypto.html#int" title="int ()"><span class="type">int</span></a> *ans_len</code></em>);</pre>
1940
1610
<p>
1941
1611
Creates the DER coding for the LEN parameter (only the length).
1942
1612
The <em class="parameter"><code>ans</code></em> buffer is pre-allocated and must have room for the output.</p>
1943
 
<p>
1944
 
</p>
1945
1613
<div class="variablelist"><table border="0">
1946
1614
<col align="left" valign="top">
1947
1615
<tbody>
1948
1616
<tr>
1949
1617
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1950
 
<td> value to convert.
 
1618
<td>value to convert.
1951
1619
</td>
1952
1620
</tr>
1953
1621
<tr>
1954
1622
<td><p><span class="term"><em class="parameter"><code>ans</code></em> :</span></p></td>
1955
 
<td> string returned.
 
1623
<td>string returned.
1956
1624
</td>
1957
1625
</tr>
1958
1626
<tr>
1959
1627
<td><p><span class="term"><em class="parameter"><code>ans_len</code></em> :</span></p></td>
1960
 
<td> number of meaningful bytes of ANS (ans[0]..ans[ans_len-1]).
 
1628
<td>number of meaningful bytes of ANS (ans[0]..ans[ans_len-1]).
1961
1629
</td>
1962
1630
</tr>
1963
1631
</tbody>
1966
1634
<hr>
1967
1635
<div class="refsect2" title="asn1_find_node ()">
1968
1636
<a name="asn1-find-node"></a><h3>asn1_find_node ()</h3>
1969
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a>           asn1_find_node                      (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> pointer,
1970
 
                                                         const char *name);</pre>
 
1637
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="returnvalue">ASN1_TYPE</span></a>           asn1_find_node                      (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> pointer</code></em>,
 
1638
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
1971
1639
<p>
1972
1640
Searches for an element called NAME starting from POINTER.  The
1973
1641
name is composed by differents identifiers separated by dots.  When
1974
1642
*POINTER has a name, the first identifier must be the name of
1975
1643
*POINTER, otherwise it must be the name of one child of *POINTER.</p>
1976
 
<p>
1977
 
</p>
1978
1644
<div class="variablelist"><table border="0">
1979
1645
<col align="left" valign="top">
1980
1646
<tbody>
1981
1647
<tr>
1982
1648
<td><p><span class="term"><em class="parameter"><code>pointer</code></em> :</span></p></td>
1983
 
<td> NODE_ASN element pointer.
 
1649
<td>NODE_ASN element pointer.
1984
1650
</td>
1985
1651
</tr>
1986
1652
<tr>
1987
1653
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1988
 
<td> null terminated string with the element's name to find.
 
1654
<td>null terminated string with the element's name to find.
1989
1655
</td>
1990
1656
</tr>
1991
1657
<tr>
1999
1665
<hr>
2000
1666
<div class="refsect2" title="asn1_copy_node ()">
2001
1667
<a name="asn1-copy-node"></a><h3>asn1_copy_node ()</h3>
2002
 
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a>        asn1_copy_node                      (<a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> dst,
2003
 
                                                         const char *dst_name,
2004
 
                                                         <a class="link" href="gnutls-libtasn1.html#ASN1-TYPE--CAPS" title="ASN1_TYPE">ASN1_TYPE</a> src,
2005
 
                                                         const char *src_name);</pre>
 
1668
<pre class="programlisting"><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="returnvalue">asn1_retCode</span></a>        asn1_copy_node                      (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> dst</code></em>,
 
1669
                                                         <em class="parameter"><code>const <span class="type">char</span> *dst_name</code></em>,
 
1670
                                                         <em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#ASN1-TYPE:CAPS" title="ASN1_TYPE"><span class="type">ASN1_TYPE</span></a> src</code></em>,
 
1671
                                                         <em class="parameter"><code>const <span class="type">char</span> *src_name</code></em>);</pre>
2006
1672
<p>
2007
1673
Create a deep copy of a ASN1_TYPE variable.</p>
2008
 
<p>
2009
 
</p>
2010
1674
<div class="variablelist"><table border="0">
2011
1675
<col align="left" valign="top">
2012
1676
<tbody>
2013
1677
<tr>
2014
1678
<td><p><span class="term"><em class="parameter"><code>dst</code></em> :</span></p></td>
2015
 
<td> Destination ASN1_TYPE node.
 
1679
<td>Destination ASN1_TYPE node.
2016
1680
</td>
2017
1681
</tr>
2018
1682
<tr>
2019
1683
<td><p><span class="term"><em class="parameter"><code>dst_name</code></em> :</span></p></td>
2020
 
<td> Field name in destination node.
 
1684
<td>Field name in destination node.
2021
1685
</td>
2022
1686
</tr>
2023
1687
<tr>
2024
1688
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
2025
 
<td> Source ASN1_TYPE node.
 
1689
<td>Source ASN1_TYPE node.
2026
1690
</td>
2027
1691
</tr>
2028
1692
<tr>
2029
1693
<td><p><span class="term"><em class="parameter"><code>src_name</code></em> :</span></p></td>
2030
 
<td> Field name in source node.
 
1694
<td>Field name in source node.
2031
1695
</td>
2032
1696
</tr>
2033
1697
<tr>
2040
1704
</div>
2041
1705
<hr>
2042
1706
<div class="refsect2" title="LIBTASN1_VERSION">
2043
 
<a name="LIBTASN1-VERSION--CAPS"></a><h3>LIBTASN1_VERSION</h3>
 
1707
<a name="LIBTASN1-VERSION:CAPS"></a><h3>LIBTASN1_VERSION</h3>
2044
1708
<pre class="programlisting">#define LIBTASN1_VERSION ASN1_VERSION
2045
1709
</pre>
2046
1710
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
2052
1716
</div>
2053
1717
<hr>
2054
1718
<div class="refsect2" title="MAX_NAME_SIZE">
2055
 
<a name="MAX-NAME-SIZE--CAPS"></a><h3>MAX_NAME_SIZE</h3>
 
1719
<a name="MAX-NAME-SIZE:CAPS"></a><h3>MAX_NAME_SIZE</h3>
2056
1720
<pre class="programlisting"># define MAX_NAME_SIZE ASN1_MAX_NAME_SIZE
2057
1721
</pre>
2058
1722
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
2064
1728
</div>
2065
1729
<hr>
2066
1730
<div class="refsect2" title="MAX_ERROR_DESCRIPTION_SIZE">
2067
 
<a name="MAX-ERROR-DESCRIPTION-SIZE--CAPS"></a><h3>MAX_ERROR_DESCRIPTION_SIZE</h3>
 
1731
<a name="MAX-ERROR-DESCRIPTION-SIZE:CAPS"></a><h3>MAX_ERROR_DESCRIPTION_SIZE</h3>
2068
1732
<pre class="programlisting"># define MAX_ERROR_DESCRIPTION_SIZE ASN1_MAX_ERROR_DESCRIPTION_SIZE
2069
1733
</pre>
2070
1734
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
2077
1741
<hr>
2078
1742
<div class="refsect2" title="libtasn1_strerror ()">
2079
1743
<a name="libtasn1-strerror"></a><h3>libtasn1_strerror ()</h3>
2080
 
<pre class="programlisting">const char *        libtasn1_strerror                   (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);</pre>
 
1744
<pre class="programlisting">const <span class="returnvalue">char</span> *        libtasn1_strerror                   (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);</pre>
2081
1745
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
2082
1746
<h3 class="title">Warning</h3>
2083
 
<p><code class="literal">libtasn1_strerror</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="gnutls-libtasn1.html#asn1-strerror" title="asn1_strerror ()"><code class="function">asn1_strerror()</code></a> instead.</p>
 
1747
<p><code class="literal">libtasn1_strerror</code> is deprecated and should not be used in newly-written code.</p>
2084
1748
</div>
2085
1749
<p>
2086
 
This function is similar to strerror.  The only difference is that
2087
 
it accepts an error (number) returned by a libtasn1 function.</p>
2088
 
<p>
2089
1750
</p>
2090
1751
<div class="variablelist"><table border="0">
2091
1752
<col align="left" valign="top">
2092
1753
<tbody>
2093
1754
<tr>
2094
1755
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2095
 
<td> is an error returned by a libtasn1 function.
 
1756
<td>
2096
1757
</td>
2097
1758
</tr>
2098
1759
<tr>
2099
1760
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2100
 
<td> Pointer to static zero-terminated string describing error
2101
 
  code.
2102
 
 
 
1761
<td>
2103
1762
</td>
2104
1763
</tr>
2105
1764
</tbody>
2108
1767
<hr>
2109
1768
<div class="refsect2" title="libtasn1_perror ()">
2110
1769
<a name="libtasn1-perror"></a><h3>libtasn1_perror ()</h3>
2111
 
<pre class="programlisting">void                libtasn1_perror                     (<a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode">asn1_retCode</a> error);</pre>
 
1770
<pre class="programlisting"><span class="returnvalue">void</span>                libtasn1_perror                     (<em class="parameter"><code><a class="link" href="gnutls-libtasn1.html#asn1-retCode" title="asn1_retCode"><span class="type">asn1_retCode</span></a> error</code></em>);</pre>
2112
1771
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
2113
1772
<h3 class="title">Warning</h3>
2114
 
<p><code class="literal">libtasn1_perror</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="gnutls-libtasn1.html#asn1-perror" title="asn1_perror ()"><code class="function">asn1_perror()</code></a> instead.</p>
 
1773
<p><code class="literal">libtasn1_perror</code> is deprecated and should not be used in newly-written code.</p>
2115
1774
</div>
2116
1775
<p>
2117
 
This function is like <code class="function">perror()</code>. The only difference is that it
2118
 
accepts an error returned by a libtasn1 function.</p>
2119
 
<p>
2120
1776
</p>
2121
1777
<div class="variablelist"><table border="0">
2122
1778
<col align="left" valign="top">
2123
1779
<tbody><tr>
2124
1780
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2125
 
<td> is an error returned by a libtasn1 function.
 
1781
<td>
2126
1782
</td>
2127
1783
</tr></tbody>
2128
1784
</table></div>
2131
1787
</div>
2132
1788
<div class="footer">
2133
1789
<hr>
2134
 
          Generated by GTK-Doc V1.11</div>
 
1790
          Generated by GTK-Doc V1.14</div>
2135
1791
</body>
2136
 
</html>
 
1792
</html>
 
 
b'\\ No newline at end of file'