Blame doc/manpages/gnutls_certificate_set_x509_key_mem.3

Packit 549fdc
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit 549fdc
.TH "gnutls_certificate_set_x509_key_mem" 3 "3.6.2" "gnutls" "gnutls"
Packit 549fdc
.SH NAME
Packit 549fdc
gnutls_certificate_set_x509_key_mem \- API function
Packit 549fdc
.SH SYNOPSIS
Packit 549fdc
.B #include <gnutls/gnutls.h>
Packit 549fdc
.sp
Packit 549fdc
.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 ");"
Packit 549fdc
.SH ARGUMENTS
Packit 549fdc
.IP "gnutls_certificate_credentials_t res" 12
Packit 549fdc
is a \fBgnutls_certificate_credentials_t\fP type.
Packit 549fdc
.IP "const gnutls_datum_t * cert" 12
Packit 549fdc
contains a certificate list (path) for the specified private key
Packit 549fdc
.IP "const gnutls_datum_t * key" 12
Packit 549fdc
is the private key, or \fBNULL\fP
Packit 549fdc
.IP "gnutls_x509_crt_fmt_t type" 12
Packit 549fdc
is PEM or DER
Packit 549fdc
.SH "DESCRIPTION"
Packit 549fdc
This function sets a certificate/private key pair in the
Packit 549fdc
gnutls_certificate_credentials_t type. This function may be called
Packit 549fdc
more than once, in case multiple keys/certificates exist for the
Packit 549fdc
server.
Packit 549fdc
Packit 549fdc
Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates
Packit 549fdc
is supported. This means that certificates intended for signing cannot
Packit 549fdc
be used for ciphersuites that require encryption.
Packit 549fdc
Packit 549fdc
If the certificate and the private key are given in PEM encoding
Packit 549fdc
then the strings that hold their values must be null terminated.
Packit 549fdc
Packit 549fdc
The  \fIkey\fP may be \fBNULL\fP if you are using a sign callback, see
Packit 549fdc
\fBgnutls_sign_callback_set()\fP.
Packit 549fdc
Packit 549fdc
Note that, this function by default returns zero on success and a negative value on error.
Packit 549fdc
Since 3.5.6, when the flag \fBGNUTLS_CERTIFICATE_API_V2\fP is set using \fBgnutls_certificate_set_flags()\fP
Packit 549fdc
it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key\-pair.
Packit 549fdc
.SH "RETURNS"
Packit 549fdc
On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).
Packit 549fdc
.SH "REPORTING BUGS"
Packit 549fdc
Report bugs to <bugs@gnutls.org>.
Packit 549fdc
.br
Packit 549fdc
Home page: http://www.gnutls.org
Packit 549fdc
Packit 549fdc
.SH COPYRIGHT
Packit 549fdc
Copyright \(co 2001-2018 Free Software Foundation, Inc., and others.
Packit 549fdc
.br
Packit 549fdc
Copying and distribution of this file, with or without modification,
Packit 549fdc
are permitted in any medium without royalty provided the copyright
Packit 549fdc
notice and this notice are preserved.
Packit 549fdc
.SH "SEE ALSO"
Packit 549fdc
The full documentation for
Packit 549fdc
.B gnutls
Packit 549fdc
is maintained as a Texinfo manual.
Packit 549fdc
If the /usr/share/doc/gnutls/
Packit 549fdc
directory does not contain the HTML form visit
Packit 549fdc
.B
Packit 549fdc
.IP http://www.gnutls.org/manual/
Packit 549fdc
.PP