Blame doc/functions/gnutls_x509_cidr_to_rfc5280
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@deftypefun {int} {gnutls_x509_cidr_to_rfc5280} (const char * @var{cidr}, gnutls_datum_t * @var{cidr_rfc5280})
|
|
Packit Service |
4684c1 |
@var{cidr}: CIDR in RFC4632 format (IP/prefix), null-terminated
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@var{cidr_rfc5280}: CIDR range converted to RFC5280 format
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This function will convert text CIDR range with prefix (such as '10.0.0.0/8')
|
|
Packit Service |
4684c1 |
to RFC5280 (IP address in network byte order followed by its network mask).
|
|
Packit Service |
4684c1 |
Works for both IPv4 and IPv6.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The resulting object is directly usable for IP name constraints usage,
|
|
Packit Service |
4684c1 |
for example in functions @code{gnutls_x509_name_constraints_add_permitted}
|
|
Packit Service |
4684c1 |
or @code{gnutls_x509_name_constraints_add_excluded} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The data in datum needs to be deallocated using @code{gnutls_free()} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Since:} 3.5.4
|
|
Packit Service |
4684c1 |
@end deftypefun
|