1gnutls_pem_base64_decode(3) gnutls gnutls_pem_base64_decode(3)
2
3
4
6 gnutls_pem_base64_decode - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_pem_base64_decode(const char * header, const gnutls_datum_t
12 * b64_data, unsigned char * result, size_t * result_size);
13
15 const char * header
16 A null terminated string with the PEM header (eg. CERTIFI‐
17 CATE)
18
19 const gnutls_datum_t * b64_data
20 contain the encoded data
21
22 unsigned char * result
23 the place where decoded data will be copied
24
25 size_t * result_size
26 holds the size of the result
27
29 This function will decode the given encoded data. If the header given
30 is non NULL this function will search for "-----BEGIN header" and
31 decode only this part. Otherwise it will decode the first PEM packet
32 found.
33
35 On success GNUTLS_E_SUCCESS (0) is returned, GNUTLS_E_SHORT_MEMORY_BUF‐
36 FER is returned if the buffer given is not long enough, or 0 on suc‐
37 cess.
38
40 Report bugs to <bugs@gnutls.org>.
41 Home page: https://www.gnutls.org
42
43
45 Copyright © 2001-2019 Free Software Foundation, Inc., and others.
46 Copying and distribution of this file, with or without modification,
47 are permitted in any medium without royalty provided the copyright
48 notice and this notice are preserved.
49
51 The full documentation for gnutls is maintained as a Texinfo manual.
52 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
53 visit
54
55 https://www.gnutls.org/manual/
56
57gnutls 3.6.8 gnutls_pem_base64_decode(3)