Blame doc/functions/gnutls_x509_trust_list_add_named_crt

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_x509_trust_list_add_named_crt} (gnutls_x509_trust_list_t @var{list}, gnutls_x509_crt_t @var{cert}, const void * @var{name}, size_t @var{name_size}, unsigned int @var{flags})
Packit Service 4684c1
@var{list}: The list
Packit Service 4684c1
Packit Service 4684c1
@var{cert}: A certificate
Packit Service 4684c1
Packit Service 4684c1
@var{name}: An identifier for the certificate
Packit Service 4684c1
Packit Service 4684c1
@var{name_size}: The size of the identifier
Packit Service 4684c1
Packit Service 4684c1
@var{flags}: should be 0.
Packit Service 4684c1
Packit Service 4684c1
This function will add the given certificate to the trusted
Packit Service 4684c1
list and associate it with a name. The certificate will not be
Packit Service 4684c1
be used for verification with @code{gnutls_x509_trust_list_verify_crt()} 
Packit Service 4684c1
but with @code{gnutls_x509_trust_list_verify_named_crt()}  or
Packit Service 4684c1
@code{gnutls_x509_trust_list_verify_crt2()}  - the latter only since
Packit Service 4684c1
GnuTLS 3.4.0 and if a hostname is provided.
Packit Service 4684c1
Packit Service 4684c1
In principle this function can be used to set individual "server"
Packit Service 4684c1
certificates that are trusted by the user for that specific server
Packit Service 4684c1
but for no other purposes.
Packit Service 4684c1
Packit Service 4684c1
The certificate  @code{cert} must not be deinitialized during the lifetime
Packit Service 4684c1
of the  @code{list} .
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit Service 4684c1
negative error value.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.0.0
Packit Service 4684c1
@end deftypefun