1gnutls_x509_cidr_to_rfc5280(3) gnutls gnutls_x509_cidr_to_rfc5280(3)
2
3
4
6 gnutls_x509_cidr_to_rfc5280 - API function
7
9 #include <gnutls/x509.h>
10
11 int gnutls_x509_cidr_to_rfc5280(const char * cidr, gnutls_datum_t *
12 cidr_rfc5280);
13
15 const char * cidr
16 CIDR in RFC4632 format (IP/prefix), null-terminated
17
18 gnutls_datum_t * cidr_rfc5280
19 CIDR range converted to RFC5280 format
20
22 This function will convert text CIDR range with prefix (such as
23 '10.0.0.0/8') to RFC5280 (IP address in network byte order followed by
24 its network mask). Works for both IPv4 and IPv6.
25
26 The resulting object is directly usable for IP name constraints usage,
27 for example in functions gnutls_x509_name_constraints_add_permitted or
28 gnutls_x509_name_constraints_add_excluded.
29
30 The data in datum needs to be deallocated using gnutls_free().
31
33 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative
34 error value.
35
37 3.5.4
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.11 gnutls_x509_cidr_to_rfc5280(3)