1gnutls_certificate_set_x509_key_mem(3g)nutlgsnutls_certificate_set_x509_key_mem(3)
2
3
4

NAME

6       gnutls_certificate_set_x509_key_mem - Used to set keys in a gnutls_cer‐
7       tificate_credentials_t structure
8

SYNOPSIS

10       #include <gnutls/gnutls.h>
11
12       int      gnutls_certificate_set_x509_key_mem(gnutls_certificate_creden‐
13       tials_t  res,  const gnutls_datum_t * cert, const gnutls_datum_t * key,
14       gnutls_x509_crt_fmt_t type);
15

ARGUMENTS

17       gnutls_certificate_credentials_t res
18                   is a gnutls_certificate_credentials_t structure.
19
20       const gnutls_datum_t * cert
21                   contains a certificate list (path) for the  specified  pri‐
22                   vate key
23
24       const gnutls_datum_t * key
25                   is the private key, or NULL
26
27       gnutls_x509_crt_fmt_t type
28                   is PEM or DER
29

DESCRIPTION

31       This  function  sets  a certificate/private key pair in the gnutls_cer‐
32       tificate_credentials_t structure. This function may be called more than
33       once (in case multiple keys/certificates exist for the server).
34

CURRENTLY ARE SUPPORTED

36       RSA PKCS-1 encoded private keys, DSA private keys.
37
38       DSA  private  keys  are  encoded the OpenSSL way, which is an ASN.1 DER
39       sequence of 6 INTEGERs - version, p, q, g, pub, priv.
40
41       Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates
42       is  supported. This means that certificates intended for signing cannot
43       be used for ciphersuites that require encryption.
44
45       If the certificate and the private key are given in PEM  encoding  then
46       the strings that hold their values must be null terminated.
47
48       The   key   may  be  NULL  if  you  are  using  a  sign  callback,  see
49       gnutls_sign_callback_set().
50

RETURNS

52       GNUTLS_E_SUCCESS on success, or an error code.
53

REPORTING BUGS

55       Report   bugs   to    <bug-gnutls@gnu.org>.     GnuTLS    home    page:
56       http://www.gnu.org/software/gnutls/  General  help  using GNU software:
57       http://www.gnu.org/gethelp/
58
60       Copyright © 2008 Free Software Foundation.
61       Copying and distribution of this file, with  or  without  modification,
62       are  permitted  in  any  medium  without royalty provided the copyright
63       notice and this notice are preserved.
64

SEE ALSO

66       The full documentation for gnutls is maintained as  a  Texinfo  manual.
67       If  the  info  and gnutls programs are properly installed at your site,
68       the command
69
70              info gnutls
71
72       should give you access to the complete manual.
73
74
75
76gnutls                               2.8.g6nutls_certificate_set_x509_key_mem(3)
Impressum