| X509V3_ADDR_SUBSET(3) | Library Functions Manual | X509V3_ADDR_SUBSET(3) |
X509v3_addr_subset,
X509v3_asid_subset — RFC
3779 subset relationship
#include
<openssl/x509v3.h>
int
X509v3_addr_subset(IPAddrBlocks
*child, IPAddrBlocks
*parent);
int
X509v3_asid_subset(ASIdentifiers
*child, ASIdentifiers
*parent);
X509v3_addr_subset()
determines if all IP address resources present in
child are contained in the corresponding resources in
parent.
The implementation assumes but does not ensure that both child and parent are in canonical form as described in X509v3_addr_is_canonical(3). In particular, both child and parent are sorted appropriately and they contain at most one IPAddressFamily object per address family identifier (AFI) and optional subsequent address family identifier (SAFI).
The checks are, in order:
NULL or
identical to parent then child
is a subset of parent. In particular, a
NULL parent is allowed for a
NULL child.NULL then
child is not a subset of
parent.X509v3_asid_subset()
determines if all AS identifier resources in child are
contained in the corresponding resources in
parent.
The description for
X509v3_addr_subset()
applies mutatis mutandis. In particular, child and
parent must be in canonical form per
X509v3_asid_is_canonical(3),
but this is not enforced.
X509v3_addr_subset() and
X509v3_asid_subset() return 1 if and only if
child is a subset of parent,
otherwise they return 0. If both child and
parent are in canonical form, these functions cannot
fail.
ASIdentifiers_new(3), ASRange_new(3), crypto(3), IPAddressRange_new(3), X509_new(3), X509v3_addr_add_inherit(3), X509v3_asid_add_inherit(3)
RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers.
These functions first appeared in OpenSSL 0.9.8e and have been available since OpenBSD 7.1.
| September 30, 2023 | openbsd |