Debian Codegraph @

doc/functions/gnutls_x509_ext_import_key_usage

raw
1
2
3
4
5 @deftypefun {int} {gnutls_x509_ext_import_key_usage} (const gnutls_datum_t * @var{ext}, unsigned int * @var{key_usage})
6 @var{ext}: the DER encoded extension data
7
8 @var{key_usage}: where the key usage bits will be stored
9
10 This function will return certificate's key usage, by reading the DER
11 data of the keyUsage X.509 extension (2.5.29.15). The key usage value will ORed
12 values of the: @code{GNUTLS_KEY_DIGITAL_SIGNATURE} ,
13 @code{GNUTLS_KEY_NON_REPUDIATION} , @code{GNUTLS_KEY_KEY_ENCIPHERMENT} ,
14 @code{GNUTLS_KEY_DATA_ENCIPHERMENT} , @code{GNUTLS_KEY_KEY_AGREEMENT} ,
15 @code{GNUTLS_KEY_KEY_CERT_SIGN} , @code{GNUTLS_KEY_CRL_SIGN} ,
16 @code{GNUTLS_KEY_ENCIPHER_ONLY} , @code{GNUTLS_KEY_DECIPHER_ONLY} .
17
18 @strong{Returns:} the certificate key usage, or a negative error code in case of
19 parsing error. If the certificate does not contain the keyUsage
20 extension @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} will be
21 returned.
22
23 @strong{Since:} 3.3.0
24 @end deftypefun