1gnutls_certificate_get_crt_raw(3) gnutls gnutls_certificate_get_crt_raw(3)
2
3
4
6 gnutls_certificate_get_crt_raw - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_certificate_get_crt_raw(gnutls_certificate_credentials_t sc,
12 unsigned idx1, unsigned idx2, gnutls_datum_t * cert);
13
15 gnutls_certificate_credentials_t sc
16 is a gnutls_certificate_credentials_t type.
17
18 unsigned idx1
19 the index of the certificate chain if multiple are present
20
21 unsigned idx2
22 the index of the certificate in the chain. Zero gives the
23 server's certificate.
24
25 gnutls_datum_t * cert
26 Will hold the DER encoded certificate.
27
29 This function will return the DER encoded certificate of the server or
30 any other certificate on its certificate chain (based on idx2 ). The
31 returned data should be treated as constant and only accessible during
32 the lifetime of sc . The idx1 matches the value gnutls_certifi‐
33 cate_set_x509_key() and friends functions.
34
36 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative er‐
37 ror value. In case the indexes are out of bounds GNUTLS_E_RE‐
38 QUESTED_DATA_NOT_AVAILABLE is returned.
39
41 3.2.5
42
44 Report bugs to <bugs@gnutls.org>.
45 Home page: https://www.gnutls.org
46
47
49 Copyright © 2001-2023 Free Software Foundation, Inc., and others.
50 Copying and distribution of this file, with or without modification,
51 are permitted in any medium without royalty provided the copyright no‐
52 tice and this notice are preserved.
53
55 The full documentation for gnutls is maintained as a Texinfo manual.
56 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
57 visit
58
59 https://www.gnutls.org/manual/
60
61gnutls 3.8.2 gnutls_certificate_get_crt_raw(3)