1gnutls_pubkey_export(3)             gnutls             gnutls_pubkey_export(3)
2
3
4

NAME

6       gnutls_pubkey_export - API function
7

SYNOPSIS

9       #include <gnutls/abstract.h>
10
11       int   gnutls_pubkey_export(gnutls_pubkey_t  key,  gnutls_x509_crt_fmt_t
12       format, void * output_data, size_t * output_data_size);
13

ARGUMENTS

15       gnutls_pubkey_t key
16                   Holds the certificate
17
18       gnutls_x509_crt_fmt_t format
19                   the format of output params. One of PEM or DER.
20
21       void * output_data
22                   will contain a certificate PEM or DER encoded
23
24       size_t * output_data_size
25                   holds the size of output_data (and will be replaced by  the
26                   actual size of parameters)
27

DESCRIPTION

29       This  function  will  export  the public key to DER or PEM format.  The
30       contents of the exported data is the SubjectPublicKeyInfo X.509  struc‐
31       ture.
32
33       If  the  buffer  provided  is  not long enough to hold the output, then
34       *output_data_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER  will  be
35       returned.
36
37       If  the  structure is PEM encoded, it will have a header of "BEGIN CER‐
38       TIFICATE".
39

RETURNS

41       In case of failure a negative error code will be  returned,  and  0  on
42       success.
43

SINCE

45       2.12.0
46

REPORTING BUGS

48       Report bugs to <bugs@gnutls.org>.
49       Home page: https://www.gnutls.org
50
51
53       Copyright © 2001- Free Software Foundation, Inc., and others.
54       Copying  and  distribution  of this file, with or without modification,
55       are permitted in any medium  without  royalty  provided  the  copyright
56       notice and this notice are preserved.
57

SEE ALSO

59       The  full  documentation  for gnutls is maintained as a Texinfo manual.
60       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
61       visit
62
63       https://www.gnutls.org/manual/
64
65gnutls                              3.6.15             gnutls_pubkey_export(3)
Impressum