Blame doc/manpages/gnutls_x509_privkey_export2_pkcs8.3

Packit 549fdc
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit 549fdc
.TH "gnutls_x509_privkey_export2_pkcs8" 3 "3.6.2" "gnutls" "gnutls"
Packit 549fdc
.SH NAME
Packit 549fdc
gnutls_x509_privkey_export2_pkcs8 \- API function
Packit 549fdc
.SH SYNOPSIS
Packit 549fdc
.B #include <gnutls/x509.h>
Packit 549fdc
.sp
Packit 549fdc
.BI "int gnutls_x509_privkey_export2_pkcs8(gnutls_x509_privkey_t " key ", gnutls_x509_crt_fmt_t " format ", const char * " password ", unsigned int " flags ", gnutls_datum_t * " out ");"
Packit 549fdc
.SH ARGUMENTS
Packit 549fdc
.IP "gnutls_x509_privkey_t key" 12
Packit 549fdc
Holds the key
Packit 549fdc
.IP "gnutls_x509_crt_fmt_t format" 12
Packit 549fdc
the format of output params. One of PEM or DER.
Packit 549fdc
.IP "const char * password" 12
Packit 549fdc
the password that will be used to encrypt the key.
Packit 549fdc
.IP "unsigned int flags" 12
Packit 549fdc
an ORed sequence of gnutls_pkcs_encrypt_flags_t
Packit 549fdc
.IP "gnutls_datum_t * out" 12
Packit 549fdc
will contain a private key PEM or DER encoded
Packit 549fdc
.SH "DESCRIPTION"
Packit 549fdc
This function will export the private key to a PKCS8 structure.
Packit 549fdc
Both RSA and DSA keys can be exported. For DSA keys we use
Packit 549fdc
PKCS \fB11\fP definitions. If the flags do not specify the encryption
Packit 549fdc
cipher, then the default 3DES (PBES2) will be used.
Packit 549fdc
Packit 549fdc
The  \fIpassword\fP can be either ASCII or UTF\-8 in the default PBES2
Packit 549fdc
encryption schemas, or ASCII for the PKCS12 schemas.
Packit 549fdc
Packit 549fdc
The output buffer is allocated using \fBgnutls_malloc()\fP.
Packit 549fdc
Packit 549fdc
If the structure is PEM encoded, it will have a header
Packit 549fdc
of "BEGIN ENCRYPTED PRIVATE KEY" or "BEGIN PRIVATE KEY" if
Packit 549fdc
encryption is not used.
Packit 549fdc
.SH "RETURNS"
Packit 549fdc
In case of failure a negative error code will be
Packit 549fdc
returned, and 0 on success.
Packit 549fdc
Packit 549fdc
Since 3.1.3
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