1gnutls_certificate_set_x509_key_mem(3g)nutlgsnutls_certificate_set_x509_key_mem(3)
2
3
4
6 gnutls_certificate_set_x509_key_mem - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_certificate_set_x509_key_mem(gnutls_certificate_creden‐
12 tials_t res, const gnutls_datum_t * cert, const gnutls_datum_t * key,
13 gnutls_x509_crt_fmt_t type);
14
16 gnutls_certificate_credentials_t res
17 is a gnutls_certificate_credentials_t structure.
18
19 const gnutls_datum_t * cert
20 contains a certificate list (path) for the specified pri‐
21 vate key
22
23 const gnutls_datum_t * key
24 is the private key, or NULL
25
26 gnutls_x509_crt_fmt_t type
27 is PEM or DER
28
30 This function sets a certificate/private key pair in the gnutls_cer‐
31 tificate_credentials_t structure. This function may be called more than
32 once, in case multiple keys/certificates exist for the server.
33
34 Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates
35 is supported. This means that certificates intended for signing cannot
36 be used for ciphersuites that require encryption.
37
38 If the certificate and the private key are given in PEM encoding then
39 the strings that hold their values must be null terminated.
40
41 The key may be NULL if you are using a sign callback, see
42 gnutls_sign_callback_set().
43
45 GNUTLS_E_SUCCESS (0) on success, or a negative error code.
46
48 Report bugs to <bugs@gnutls.org>.
49 Home page: http://www.gnutls.org
50
51
53 Copyright © 2001-2014 Free Software Foundation, Inc..
54 Copying and distribution of this file, with or without modification,
55 are permitted in any medium without royalty provided the copyright
56 notice and this notice are preserved.
57
59 The full documentation for gnutls is maintained as a Texinfo manual.
60 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
61 visit
62
63 http://www.gnutls.org/manual/
64
65gnutls 3.3.2g9nutls_certificate_set_x509_key_mem(3)