Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_x509_crq_get_dn_by_oid.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_x509_crq_get_dn_by_oid" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_x509_crq_get_dn_by_oid \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/x509.h>
7 .sp
8 .BI "int gnutls_x509_crq_get_dn_by_oid(gnutls_x509_crq_t " crq ", const char * " oid ", int " indx ", unsigned int " raw_flag ", void * " buf ", size_t * " sizeof_buf ");"
9 .SH ARGUMENTS
10 .IP "gnutls_x509_crq_t crq" 12
11 should contain a gnutls_x509_crq_t structure
12 .IP "const char * oid" 12
13 holds an Object Identified in null terminated string
14 .IP "int indx" 12
15 In case multiple same OIDs exist in the RDN, this specifies
16 which to send. Use zero to get the first one.
17 .IP "unsigned int raw_flag" 12
18 If non zero returns the raw DER data of the DN part.
19 .IP "void * buf" 12
20 a pointer to a structure to hold the name (may be \fBNULL\fP)
21 .IP "size_t * sizeof_buf" 12
22 initially holds the size of \fIbuf\fP
23 .SH "DESCRIPTION"
24 This function will extract the part of the name of the Certificate
25 request subject, specified by the given OID. The output will be
26 encoded as described in RFC2253. The output string will be ASCII
27 or UTF\-8 encoded, depending on the certificate data.
28
29 Some helper macros with popular OIDs can be found in gnutls/x509.h
30 If raw flag is zero, this function will only return known OIDs as
31 text. Other OIDs will be DER encoded, as described in RFC2253 \-\-
32 in hex format with a '\#' prefix.  You can check about known OIDs
33 using \fBgnutls_x509_dn_oid_known()\fP.
34 .SH "RETURNS"
35 \fBGNUTLS_E_SHORT_MEMORY_BUFFER\fP if the provided buffer is
36 not long enough, and in that case the *\fIsizeof_buf\fP will be
37 updated with the required size.  On success 0 is returned.
38 .SH "REPORTING BUGS"
39 Report bugs to <bug-gnutls@gnu.org>.
40 GnuTLS home page: http://www.gnu.org/software/gnutls/
41 General help using GNU software: http://www.gnu.org/gethelp/
42 .SH COPYRIGHT
43 Copyright \(co 2008 Free Software Foundation.
44 .br
45 Copying and distribution of this file, with or without modification,
46 are permitted in any medium without royalty provided the copyright
47 notice and this notice are preserved.
48 .SH "SEE ALSO"
49 The full documentation for
50 .B gnutls
51 is maintained as a Texinfo manual.  If the
52 .B info
53 and
54 .B gnutls
55 programs are properly installed at your site, the command
56 .IP
57 .B info gnutls
58 .PP
59 should give you access to the complete manual.