Debian Codegraph @

doc/functions/gnutls_pubkey_get_key_id

raw
1
2
3
4
5 @deftypefun {int} {gnutls_pubkey_get_key_id} (gnutls_pubkey_t @var{key}, unsigned int @var{flags}, unsigned char * @var{output_data}, size_t * @var{output_data_size})
6 @var{key}: Holds the public key
7
8 @var{flags}: should be one of the flags from @code{gnutls_keyid_flags_t}
9
10 @var{output_data}: will contain the key ID
11
12 @var{output_data_size}: holds the size of output_data (and will be
13 replaced by the actual size of parameters)
14
15 This function will return a unique ID that depends on the public
16 key parameters. This ID can be used in checking whether a
17 certificate corresponds to the given public key.
18
19 If the buffer provided is not long enough to hold the output, then
20 *output_data_size is updated and @code{GNUTLS_E_SHORT_MEMORY_BUFFER} will
21 be returned. The output will normally be a SHA-1 hash output,
22 which is 20 bytes.
23
24 @strong{Returns:} In case of failure a negative error code will be
25 returned, and 0 on success.
26
27 @strong{Since:} 2.12.0
28 @end deftypefun