Blame doc/manpages/gnutls_certificate_set_key.3

Packit 549fdc
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit 549fdc
.TH "gnutls_certificate_set_key" 3 "3.6.2" "gnutls" "gnutls"
Packit 549fdc
.SH NAME
Packit 549fdc
gnutls_certificate_set_key \- API function
Packit 549fdc
.SH SYNOPSIS
Packit 549fdc
.B #include <gnutls/abstract.h>
Packit 549fdc
.sp
Packit 549fdc
.BI "int gnutls_certificate_set_key(gnutls_certificate_credentials_t " res ", const char ** " names ", int " names_size ", gnutls_pcert_st * " pcert_list ", int " pcert_list_size ", gnutls_privkey_t " key ");"
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 char ** names" 12
Packit 549fdc
is an array of DNS name of the certificate (NULL if none)
Packit 549fdc
.IP "int names_size" 12
Packit 549fdc
holds the size of the names list
Packit 549fdc
.IP "gnutls_pcert_st * pcert_list" 12
Packit 549fdc
contains a certificate list (path) for the specified private key
Packit 549fdc
.IP "int pcert_list_size" 12
Packit 549fdc
holds the size of the certificate list
Packit 549fdc
.IP "gnutls_privkey_t key" 12
Packit 549fdc
is a \fBgnutls_privkey_t\fP key
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
Packit 549fdc
called more than once, in case multiple keys/certificates exist for
Packit 549fdc
the server.  For clients that want to send more than their own end\-
Packit 549fdc
entity certificate (e.g., also an intermediate CA cert), the full
Packit 549fdc
certificate chain must be provided in  \fIpcert_list\fP .
Packit 549fdc
Packit 549fdc
Note that the  \fIkey\fP and the elements of  \fIpcert_list\fP will become part of the credentials 
Packit 549fdc
structure and must not be deallocated. They will be automatically deallocated 
Packit 549fdc
when the  \fIres\fP structure is deinitialized.
Packit 549fdc
Packit 549fdc
If that function fails to load the  \fIres\fP structure is at an undefined state, it must
Packit 549fdc
not be reused to load other keys or certificates.
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 "SINCE"
Packit 549fdc
3.0
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