1gnutls_x509_ext_import_key_usage(3) gnutls gnutls_x509_ext_import_key_usage(3)
2
3
4

NAME

6       gnutls_x509_ext_import_key_usage - API function
7

SYNOPSIS

9       #include <gnutls/x509-ext.h>
10
11       int  gnutls_x509_ext_import_key_usage(const  gnutls_datum_t  * ext, un‐
12       signed int * key_usage);
13

ARGUMENTS

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

DESCRIPTION

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

RETURNS

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

SINCE

36       3.3.0
37

REPORTING BUGS

39       Report bugs to <bugs@gnutls.org>.
40       Home page: https://www.gnutls.org
41
42
44       Copyright © 2001- 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 no‐
47       tice and this notice are preserved.
48

SEE ALSO

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       https://www.gnutls.org/manual/
55
56gnutls                               3.7.8 gnutls_x509_ext_import_key_usage(3)
Impressum