1gnutls_certificate_set_key(3) gnutls gnutls_certificate_set_key(3)
2
3
4
6 gnutls_certificate_set_key - API function
7
9 #include <gnutls/abstract.h>
10
11 int gnutls_certificate_set_key(gnutls_certificate_credentials_t res,
12 const char ** names, int names_size, gnutls_pcert_st * pcert_list, int
13 pcert_list_size, gnutls_privkey_t key);
14
16 gnutls_certificate_credentials_t res
17 is a gnutls_certificate_credentials_t structure.
18
19 const char ** names
20 is an array of DNS name of the certificate (NULL if none)
21
22 int names_size
23 holds the size of the names list
24
25 gnutls_pcert_st * pcert_list
26 contains a certificate list (path) for the specified pri‐
27 vate key
28
29 int pcert_list_size
30 holds the size of the certificate list
31
32 gnutls_privkey_t key
33 is a gnutls_privkey_t key
34
36 This function sets a certificate/private key pair in the gnutls_cer‐
37 tificate_credentials_t structure. This function may be called more
38 than once, in case multiple keys/certificates exist for the server.
39 For clients that wants to send more than its own end entity certificate
40 (e.g., also an intermediate CA cert) then put the certificate chain in
41 pcert_list .
42
43 Note that the key and the elements of pcert_list will become part of
44 the credentials structure and must not be deallocated. They will be
45 automatically deallocated when the res structure is deinitialized.
46
47 If that function fails to load the res structure is at an undefined
48 state, it must not be reused to load other keys or certificates.
49
51 GNUTLS_E_SUCCESS (0) on success, or a negative error code.
52
54 3.0
55
57 Report bugs to <bugs@gnutls.org>.
58 Home page: http://www.gnutls.org
59
60
62 Copyright © 2001-2014 Free Software Foundation, Inc..
63 Copying and distribution of this file, with or without modification,
64 are permitted in any medium without royalty provided the copyright
65 notice and this notice are preserved.
66
68 The full documentation for gnutls is maintained as a Texinfo manual.
69 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
70 visit
71
72 http://www.gnutls.org/manual/
73
74gnutls 3.3.29 gnutls_certificate_set_key(3)