Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_x509_crt_get_key_usage.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_x509_crt_get_key_usage" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_x509_crt_get_key_usage \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/x509.h>
7 .sp
8 .BI "int gnutls_x509_crt_get_key_usage(gnutls_x509_crt_t " cert ", unsigned int * " key_usage ", unsigned int * " critical ");"
9 .SH ARGUMENTS
10 .IP "gnutls_x509_crt_t cert" 12
11 should contain a \fBgnutls_x509_crt_t\fP structure
12 .IP "unsigned int * key_usage" 12
13 where the key usage bits will be stored
14 .IP "unsigned int * critical" 12
15 will be non zero if the extension is marked as critical
16 .SH "DESCRIPTION"
17 This function will return certificate's key usage, by reading the
18 keyUsage X.509 extension (2.5.29.15). The key usage value will ORed
19 values of the: \fBGNUTLS_KEY_DIGITAL_SIGNATURE\fP,
20 \fBGNUTLS_KEY_NON_REPUDIATION\fP, \fBGNUTLS_KEY_KEY_ENCIPHERMENT\fP,
21 \fBGNUTLS_KEY_DATA_ENCIPHERMENT\fP, \fBGNUTLS_KEY_KEY_AGREEMENT\fP,
22 \fBGNUTLS_KEY_KEY_CERT_SIGN\fP, \fBGNUTLS_KEY_CRL_SIGN\fP,
23 \fBGNUTLS_KEY_ENCIPHER_ONLY\fP, \fBGNUTLS_KEY_DECIPHER_ONLY\fP.
24 .SH "RETURNS"
25 the certificate key usage, or a negative value in case of
26 parsing error.  If the certificate does not contain the keyUsage
27 extension \fBGNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE\fP will be
28 returned.
29 .SH "REPORTING BUGS"
30 Report bugs to <bug-gnutls@gnu.org>.
31 GnuTLS home page: http://www.gnu.org/software/gnutls/
32 General help using GNU software: http://www.gnu.org/gethelp/
33 .SH COPYRIGHT
34 Copyright \(co 2008 Free Software Foundation.
35 .br
36 Copying and distribution of this file, with or without modification,
37 are permitted in any medium without royalty provided the copyright
38 notice and this notice are preserved.
39 .SH "SEE ALSO"
40 The full documentation for
41 .B gnutls
42 is maintained as a Texinfo manual.  If the
43 .B info
44 and
45 .B gnutls
46 programs are properly installed at your site, the command
47 .IP
48 .B info gnutls
49 .PP
50 should give you access to the complete manual.