1 .TH "hx509 name functions" 3 "11 Jan 2012" "Version 1.5.2" "Heimdalx509library" \" -*- nroff -*-
5 hx509 name functions \-
10 .RI "int \fBhx509_name_to_string\fP (const hx509_name name, char **str)"
13 .RI "int \fBhx509_name_cmp\fP (hx509_name n1, hx509_name n2)"
16 .RI "int \fBhx509_parse_name\fP (hx509_context context, const char *str, hx509_name *name)"
19 .RI "int \fBhx509_name_copy\fP (hx509_context context, const hx509_name from, hx509_name *to)"
22 .RI "int \fBhx509_name_to_Name\fP (const hx509_name from, Name *to)"
25 .RI "int \fBhx509_name_expand\fP (hx509_context context, hx509_name name, hx509_env env)"
28 .RI "void \fBhx509_name_free\fP (hx509_name *name)"
31 .RI "int \fBhx509_unparse_der_name\fP (const void *data, size_t length, char **str)"
34 .RI "int \fBhx509_name_binary\fP (const hx509_name name, heim_octet_string *os)"
37 .RI "int \fBhx509_name_is_null_p\fP (const hx509_name name)"
40 .RI "int \fBhx509_general_name_unparse\fP (GeneralName *name, char **str)"
43 .SH "Detailed Description"
45 See the \fBPKIX/X.509 Names\fP for description and examples.
46 .SH "Function Documentation"
48 .SS "int hx509_general_name_unparse (GeneralName * name, char ** str)"
50 Unparse the hx509 name in name into a string.
54 \fIname\fP the name to print
56 \fIstr\fP an allocated string returns the name in string form
61 An hx509 error code, see \fBhx509_get_error_string()\fP.
65 .SS "int hx509_name_binary (const hx509_name name, heim_octet_string * os)"
67 Convert a hx509_name object to DER encoded name.
71 \fIname\fP name to concert
73 \fIos\fP data to a DER encoded name, free the resulting octet string with hx509_xfree(os->data).
78 An hx509 error code, see \fBhx509_get_error_string()\fP.
82 .SS "int hx509_name_cmp (hx509_name n1, hx509_name n2)"
84 Compare to hx509 name object, useful for sorting.
88 \fIn1\fP a hx509 name object.
90 \fIn2\fP a hx509 name object.
95 0 the objects are the same, returns > 0 is n2 is 'larger' then n2, < 0 if n1 is 'smaller' then n2.
99 .SS "int hx509_name_copy (hx509_context context, const hx509_name from, hx509_name * to)"
101 Copy a hx509 name object.
105 \fIcontext\fP A hx509 cotext.
107 \fIfrom\fP the name to copy from
109 \fIto\fP the name to copy to
114 An hx509 error code, see \fBhx509_get_error_string()\fP.
118 .SS "int hx509_name_expand (hx509_context context, hx509_name name, hx509_env env)"
120 Expands variables in the name using env. Variables are on the form ${name}. Useful when dealing with certificate templates.
124 \fIcontext\fP A hx509 cotext.
126 \fIname\fP the name to expand.
128 \fIenv\fP environment variable to expand.
133 An hx509 error code, see \fBhx509_get_error_string()\fP.
138 Only UTF8String rdnSequence names are allowed
139 .SS "void hx509_name_free (hx509_name * name)"
141 Free a hx509 name object, upond return *name will be NULL.
145 \fIname\fP a hx509 name object to be freed.
149 .SS "int hx509_name_is_null_p (const hx509_name name)"
151 Unparse the hx509 name in name into a string.
155 \fIname\fP the name to check if its empty/null.
160 non zero if the name is empty/null.
164 .SS "int hx509_name_to_Name (const hx509_name from, Name * to)"
166 Convert a hx509_name into a Name.
170 \fIfrom\fP the name to copy from
172 \fIto\fP the name to copy to
177 An hx509 error code, see \fBhx509_get_error_string()\fP.
181 .SS "int hx509_name_to_string (const hx509_name name, char ** str)"
183 Convert the hx509 name object into a printable string. The resulting string should be freed with free().
187 \fIname\fP name to print
189 \fIstr\fP the string to return
194 An hx509 error code, see \fBhx509_get_error_string()\fP.
198 .SS "int hx509_parse_name (hx509_context context, const char * str, hx509_name * name)"
200 Parse a string into a hx509 name object.
204 \fIcontext\fP A hx509 context.
206 \fIstr\fP a string to parse.
208 \fIname\fP the resulting object, NULL in case of error.
213 An hx509 error code, see \fBhx509_get_error_string()\fP.
217 .SS "int hx509_unparse_der_name (const void * data, size_t length, char ** str)"
219 Convert a DER encoded name info a string.
223 \fIdata\fP data to a DER/BER encoded name
225 \fIlength\fP length of data
227 \fIstr\fP the resulting string, is NULL on failure.
232 An hx509 error code, see \fBhx509_get_error_string()\fP.