Blame doc/functions/gnutls_pubkey_export
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@deftypefun {int} {gnutls_pubkey_export} (gnutls_pubkey_t @var{key}, gnutls_x509_crt_fmt_t @var{format}, void * @var{output_data}, size_t * @var{output_data_size})
|
|
Packit Service |
4684c1 |
@var{key}: Holds the certificate
|
|
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{output_data}: will contain a certificate PEM or DER encoded
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@var{output_data_size}: holds the size of output_data (and will be
|
|
Packit Service |
4684c1 |
replaced by the actual size of parameters)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This function will export the public key to DER or PEM format.
|
|
Packit Service |
4684c1 |
The contents of the exported data is the SubjectPublicKeyInfo
|
|
Packit Service |
4684c1 |
X.509 structure.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
If the buffer provided is not long enough to hold the output, then
|
|
Packit Service |
4684c1 |
*output_data_size is updated and @code{GNUTLS_E_SHORT_MEMORY_BUFFER} will
|
|
Packit Service |
4684c1 |
be returned.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
If the structure is PEM encoded, it will have a header
|
|
Packit Service |
4684c1 |
of "BEGIN CERTIFICATE".
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Returns:} In case of failure a negative error code will be
|
|
Packit Service |
4684c1 |
returned, and 0 on success.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Since:} 2.12.0
|
|
Packit Service |
4684c1 |
@end deftypefun
|