Blame doc/functions/gnutls_x509_privkey_export2

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_x509_privkey_export2} (gnutls_x509_privkey_t @var{key}, gnutls_x509_crt_fmt_t @var{format}, gnutls_datum_t * @var{out})
Packit Service 4684c1
@var{key}: Holds the key
Packit Service 4684c1
Packit Service 4684c1
@var{format}: the format of output params. One of PEM or DER.
Packit Service 4684c1
Packit Service 4684c1
@var{out}: will contain a private key PEM or DER encoded
Packit Service 4684c1
Packit Service 4684c1
This function will export the private key to a PKCS@code{1}  structure for
Packit Service 4684c1
RSA or RSA-PSS keys, and integer sequence for DSA keys. Other keys types
Packit Service 4684c1
will be exported in PKCS@code{8}  form.
Packit Service 4684c1
Packit Service 4684c1
The output buffer is allocated using @code{gnutls_malloc()} .
Packit Service 4684c1
Packit Service 4684c1
It is recommended to use @code{gnutls_x509_privkey_export2_pkcs8()}  instead
Packit Service 4684c1
of this function, when a consistent output format is required.
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
Since 3.1.3
Packit Service 4684c1
@end deftypefun