1gnutls_certificate_get_x509_key(3)  gnutls  gnutls_certificate_get_x509_key(3)
2
3
4

NAME

6       gnutls_certificate_get_x509_key - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int    gnutls_certificate_get_x509_key(gnutls_certificate_credentials_t
12       res, unsigned index, gnutls_x509_privkey_t * key);
13

ARGUMENTS

15       gnutls_certificate_credentials_t res
16                   is a gnutls_certificate_credentials_t type.
17
18       unsigned index
19                   The index of the key to obtain.
20
21       gnutls_x509_privkey_t * key
22                   Location to store the key.
23

DESCRIPTION

25       Obtains a X.509 private key that has been stored in  res  with  one  of
26       gnutls_certificate_set_x509_key(),        gnutls_certificate_set_key(),
27       gnutls_certificate_set_x509_key_file(),                 gnutls_certifi‐
28       cate_set_x509_key_file2(),   gnutls_certificate_set_x509_key_mem(),  or
29       gnutls_certificate_set_x509_key_mem2(). The returned key must be  deal‐
30       located with gnutls_x509_privkey_deinit() when no longer needed.
31
32       The     index    matches    the   return   value   of   gnutls_certifi‐
33       cate_set_x509_key() and friends  functions,  when  the  GNUTLS_CERTIFI‐
34       CATE_API_V2 flag is set.
35
36       If     there     is     no     key     with     the     given    index,
37       GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned. If the key with  the
38       given index is not a X.509 key, GNUTLS_E_INVALID_REQUEST is returned.
39

RETURNS

41       GNUTLS_E_SUCCESS (0) on success, or a negative error code.
42

SINCE

44       3.4.0
45

REPORTING BUGS

47       Report bugs to <bugs@gnutls.org>.
48       Home page: http://www.gnutls.org
49
50
52       Copyright © 2001-2018 Free Software Foundation, Inc., and others.
53       Copying  and  distribution  of this file, with or without modification,
54       are permitted in any medium  without  royalty  provided  the  copyright
55       notice and this notice are preserved.
56

SEE ALSO

58       The  full  documentation  for gnutls is maintained as a Texinfo manual.
59       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
60       visit
61
62       http://www.gnutls.org/manual/
63
64gnutls                               3.6.5  gnutls_certificate_get_x509_key(3)
Impressum