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 - API function
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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

CURRENTLY ARE SUPPORTED

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

RETURNS

51       GNUTLS_E_SUCCESS on success, or an error code.
52

REPORTING BUGS

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

SEE ALSO

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