Blame doc/functions/gnutls_certificate_get_x509_key

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_certificate_get_x509_key} (gnutls_certificate_credentials_t @var{res}, unsigned @var{index}, gnutls_x509_privkey_t * @var{key})
Packit Service 4684c1
@var{res}: is a @code{gnutls_certificate_credentials_t}  type.
Packit Service 4684c1
Packit Service 4684c1
@var{index}: The index of the key to obtain.
Packit Service 4684c1
Packit Service 4684c1
@var{key}: Location to store the key.
Packit Service 4684c1
Packit Service 4684c1
Obtains a X.509 private key that has been stored in  @code{res} with one of
Packit Service 4684c1
@code{gnutls_certificate_set_x509_key()} , @code{gnutls_certificate_set_key()} ,
Packit Service 4684c1
@code{gnutls_certificate_set_x509_key_file()} ,
Packit Service 4684c1
@code{gnutls_certificate_set_x509_key_file2()} ,
Packit Service 4684c1
@code{gnutls_certificate_set_x509_key_mem()} , or
Packit Service 4684c1
@code{gnutls_certificate_set_x509_key_mem2()} . The returned key must be deallocated
Packit Service 4684c1
with @code{gnutls_x509_privkey_deinit()}  when no longer needed.
Packit Service 4684c1
Packit Service 4684c1
The  @code{index} matches the return value of @code{gnutls_certificate_set_x509_key()}  and friends
Packit Service 4684c1
functions, when the @code{GNUTLS_CERTIFICATE_API_V2}  flag is set.
Packit Service 4684c1
Packit Service 4684c1
If there is no key with the given index,
Packit Service 4684c1
@code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE}  is returned. If the key with the
Packit Service 4684c1
given index is not a X.509 key, @code{GNUTLS_E_INVALID_REQUEST}  is returned.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} @code{GNUTLS_E_SUCCESS}  (0) on success, or a negative error code.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.4.0
Packit Service 4684c1
@end deftypefun