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"
4 gnutls_x509_crt_get_key_usage \- API function
6 .B #include <gnutls/x509.h>
8 .BI "int gnutls_x509_crt_get_key_usage(gnutls_x509_crt_t " cert ", unsigned int * " key_usage ", unsigned int * " critical ");"
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
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.
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
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/
34 Copyright \(co 2008 Free Software Foundation.
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.
40 The full documentation for
42 is maintained as a Texinfo manual. If the
46 programs are properly installed at your site, the command
50 should give you access to the complete manual.