1gnutls_x509_ext_import_key_usage(3) gnutls gnutls_x509_ext_import_key_usage(3)
2
3
4
6 gnutls_x509_ext_import_key_usage - API function
7
9 #include <gnutls/x509-ext.h>
10
11 int gnutls_x509_ext_import_key_usage(const gnutls_datum_t * ext,
12 unsigned int * key_usage);
13
15 const gnutls_datum_t * ext
16 the DER encoded extension data
17
18 unsigned int * key_usage
19 where the key usage bits will be stored
20
22 This function will return certificate's key usage, by reading the DER
23 data of the keyUsage X.509 extension (2.5.29.15). The key usage value
24 will ORed values of the: GNUTLS_KEY_DIGITAL_SIGNATURE,
25 GNUTLS_KEY_NON_REPUDIATION, GNUTLS_KEY_KEY_ENCIPHERMENT,
26 GNUTLS_KEY_DATA_ENCIPHERMENT, GNUTLS_KEY_KEY_AGREEMENT,
27 GNUTLS_KEY_KEY_CERT_SIGN, GNUTLS_KEY_CRL_SIGN, GNUTLS_KEY_ENCI‐
28 PHER_ONLY, GNUTLS_KEY_DECIPHER_ONLY.
29
31 the certificate key usage, or a negative error code in case of parsing
32 error. If the certificate does not contain the keyUsage extension
33 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.
34
36 3.3.0
37
39 Report bugs to <bugs@gnutls.org>.
40 Home page: http://www.gnutls.org
41
42
44 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
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
50 The full documentation for gnutls is maintained as a Texinfo manual.
51 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
52 visit
53
54 http://www.gnutls.org/manual/
55
56gnutls 3.6.5 gnutls_x509_ext_import_key_usage(3)