gnutls_x509_cidr_to_rfc5280(3)
β¨ NAME β¨
okay bestie, meet gnutls_x509_cidr_to_rfc5280 β literally just an API function, and yes that's the whole name, she's not hiding anything π
(this page lives in the gnutls manual, section 3, iykyk)
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_cidr_to_rfc5280(const char * cidr, gnutls_datum_t *
cidr_rfc5280);
πΈ ARGUMENTS πΈ
const char * cidrβ the CIDR, in RFC4632 format (IP/prefix), and it's gotta be null-terminated, no exceptions bestie πgnutls_datum_t * cidr_rfc5280β where the CIDR range lands once it's been glow-up'd into RFC5280 format β¨
π DESCRIPTION π
so the way this works is: this function takes a text CIDR range with a prefix β think '10.0.0.0/8' β and converts it to RFC5280 format, which is the IP address in network byte order followed by its network mask. iconic, honestly. and it works for both IPv4 and IPv6, so she's versatile π«Ά
the resulting object is directly usable for IP name constraints usage, like for example in the functions gnutls_x509_name_constraints_add_permitted or gnutls_x509_name_constraints_add_excluded. so you can just take your little converted datum and go straight to business, no middle steps, we love that for us.
β οΈ heads up bestie: the data in the datum needs to be deallocated using gnutls_free(). don't forget, or it's giving memory leak energy π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value π (not the slay outcome, but she's honest about it)
β SINCE β
3.5.4 β so she's been around a minute, a real veteran queen π
π REPORTING BUGS π
found a bug? don't suffer in silence, report it to <bugs@gnutls.org> π
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, share her, just don't strip her credits π«Ά
π§ SEE ALSO π§
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit
https://www.gnutls.org/manual/
and that's the whole page, bestie β gnutls version 3.8.13, manual section 3, gnutls_x509_cidr_to_rfc5280(3). go convert some CIDR ranges, you absolute main character πβ¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms