Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_certificate_set_x509_key_mem.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_certificate_set_x509_key_mem" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_certificate_set_x509_key_mem \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_certificate_set_x509_key_mem(gnutls_certificate_credentials_t " res ", const gnutls_datum_t * " cert ", const gnutls_datum_t * " key ", gnutls_x509_crt_fmt_t " type ");"
9 .SH ARGUMENTS
10 .IP "gnutls_certificate_credentials_t res" 12
11 is a \fBgnutls_certificate_credentials_t\fP structure.
12 .IP "const gnutls_datum_t * cert" 12
13 contains a certificate list (path) for the specified private key
14 .IP "const gnutls_datum_t * key" 12
15 is the private key, or \fBNULL\fP
16 .IP "gnutls_x509_crt_fmt_t type" 12
17 is PEM or DER
18 .SH "DESCRIPTION"
19 This function sets a certificate/private key pair in the
20 gnutls_certificate_credentials_t structure. This function may be called
21 more than once (in case multiple keys/certificates exist for the
22 server).
23 .SH "CURRENTLY ARE SUPPORTED"
24 RSA PKCS\-1 encoded private keys,
25 DSA private keys.
26
27 DSA private keys are encoded the OpenSSL way, which is an ASN.1
28 DER sequence of 6 INTEGERs \- version, p, q, g, pub, priv.
29
30 Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates
31 is supported. This means that certificates intended for signing cannot
32 be used for ciphersuites that require encryption.
33
34 If the certificate and the private key are given in PEM encoding
35 then the strings that hold their values must be null terminated.
36
37 The \fIkey\fP may be \fBNULL\fP if you are using a sign callback, see
38 \fBgnutls_sign_callback_set()\fP.
39 .SH "RETURNS"
40 \fBGNUTLS_E_SUCCESS\fP on success, or an error code.
41 .SH "REPORTING BUGS"
42 Report bugs to <bug-gnutls@gnu.org>.
43 GnuTLS home page: http://www.gnu.org/software/gnutls/
44 General help using GNU software: http://www.gnu.org/gethelp/
45 .SH COPYRIGHT
46 Copyright \(co 2008 Free Software Foundation.
47 .br
48 Copying and distribution of this file, with or without modification,
49 are permitted in any medium without royalty provided the copyright
50 notice and this notice are preserved.
51 .SH "SEE ALSO"
52 The full documentation for
53 .B gnutls
54 is maintained as a Texinfo manual.  If the
55 .B info
56 and
57 .B gnutls
58 programs are properly installed at your site, the command
59 .IP
60 .B info gnutls
61 .PP
62 should give you access to the complete manual.