summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509v3_addr_add_inherit.3
diff options
context:
space:
mode:
authortb <>2023-09-27 08:46:46 +0000
committertb <>2023-09-27 08:46:46 +0000
commit7d90a600d0797645d480c64312d7b1bfa6fd7659 (patch)
tree719cb838b20bef98a7212beea365f196a2e9ef12 /src/lib/libcrypto/man/X509v3_addr_add_inherit.3
parent72882765a38f31ef7380ef172db68383286dce75 (diff)
downloadopenbsd-7d90a600d0797645d480c64312d7b1bfa6fd7659.tar.gz
openbsd-7d90a600d0797645d480c64312d7b1bfa6fd7659.tar.bz2
openbsd-7d90a600d0797645d480c64312d7b1bfa6fd7659.zip
Various small tweaks in the RFC 3779 docs
Mention a few more bugs and unify manpage descriptions
Diffstat (limited to 'src/lib/libcrypto/man/X509v3_addr_add_inherit.3')
-rw-r--r--src/lib/libcrypto/man/X509v3_addr_add_inherit.342
1 files changed, 27 insertions, 15 deletions
diff --git a/src/lib/libcrypto/man/X509v3_addr_add_inherit.3 b/src/lib/libcrypto/man/X509v3_addr_add_inherit.3
index 887a5ecb21..3ca9bc59ae 100644
--- a/src/lib/libcrypto/man/X509v3_addr_add_inherit.3
+++ b/src/lib/libcrypto/man/X509v3_addr_add_inherit.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: X509v3_addr_add_inherit.3,v 1.4 2023/09/26 18:35:34 tb Exp $ 1.\" $OpenBSD: X509v3_addr_add_inherit.3,v 1.5 2023/09/27 08:46:46 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 3.\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: September 26 2023 $ 17.Dd $Mdocdate: September 27 2023 $
18.Dt X509V3_ADDR_ADD_INHERIT 3 18.Dt X509V3_ADDR_ADD_INHERIT 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -23,8 +23,7 @@
23.Nm X509v3_addr_add_range , 23.Nm X509v3_addr_add_range ,
24.Nm X509v3_addr_canonize , 24.Nm X509v3_addr_canonize ,
25.Nm X509v3_addr_is_canonical 25.Nm X509v3_addr_is_canonical
26.Nd construct X509v3 IP address blocks extensions and 26.Nd RFC 3779 IP address delegation extensions
27bring them into canonical form
28.Sh SYNOPSIS 27.Sh SYNOPSIS
29.In openssl/x509v3.h 28.In openssl/x509v3.h
30.Ft int 29.Ft int
@@ -63,15 +62,18 @@ An
63object represents the content of 62object represents the content of
64an X509v3 IP address blocks delegation extension 63an X509v3 IP address blocks delegation extension
65as defined in RFC 3779, section 2.2.3.1. 64as defined in RFC 3779, section 2.2.3.1.
66It can hold lists of delegated IP address prefixes and 65It holds lists of IP address prefixes and IP address ranges
67IP address ranges. 66delegated from the issuer to the subject of the certificate.
68It can be instantiated as explained in the EXAMPLES section 67It can be instantiated as explained in the EXAMPLES section
69and its internals are documented in 68and its internals are documented in
70.Xr IPAddressRange_new 3 . 69.Xr IPAddressRange_new 3 .
71Each list is uniquely identified by 70.Pp
71Each list in a well-formed
72.Vt IPAddrBlocks
73object is uniquely identified by
72an address family identifier (AFI) and 74an address family identifier (AFI) and
73an optional subsequent address family identifier (SAFI). 75an optional subsequent address family identifier (SAFI).
74Each list can be absent or it can contain a single 76Lists can be absent or can contain an
75.Dq inherit 77.Dq inherit
76marker to indicate that the resources are to be inherited 78marker to indicate that the resources are to be inherited
77from the corresponding list of the issuer certificate. 79from the corresponding list of the issuer certificate.
@@ -171,7 +173,7 @@ In case the range of IP addresses between
171.Fa min 173.Fa min
172and 174and
173.Fa max 175.Fa max
174is a prefix, a prefix will be added. 176is a prefix, a prefix will be added instead of a range.
175It is the caller's responsibility to ensure that 177It is the caller's responsibility to ensure that
176.Fa min 178.Fa min
177is less than or equal to 179is less than or equal to
@@ -190,7 +192,8 @@ An
190.Vt IPAddrBlocks 192.Vt IPAddrBlocks
191object is said to be in canonical form if it conforms 193object is said to be in canonical form if it conforms
192to the ordering specified in RFC 3779: 194to the ordering specified in RFC 3779:
193section 2.2.3.3 requires that the lists be sorted first by increasing 195section 2.2.3.3 requires that
196the list of lists be sorted first by increasing
194.Fa afi 197.Fa afi
195and then by increasing 198and then by increasing
196.Fa safi , 199.Fa safi ,
@@ -397,7 +400,7 @@ is desired.
397.Xr IPAddressRange_new 3 , 400.Xr IPAddressRange_new 3 ,
398.Xr X509_new 3 , 401.Xr X509_new 3 ,
399.Xr X509v3_asid_add_id_or_range 3 , 402.Xr X509v3_asid_add_id_or_range 3 ,
400.Xr X509v3_asid_get_range 3 403.Xr X509v3_addr_get_range 3
401.Sh STANDARDS 404.Sh STANDARDS
402RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers: 405RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers:
403.Bl -dash -compact 406.Bl -dash -compact
@@ -434,12 +437,12 @@ is not public.
434The above examples show how to implement the four missing functions 437The above examples show how to implement the four missing functions
435with public API. 438with public API.
436.Pp 439.Pp
437.Fn X509v3_asid_add_range 440.Fn X509v3_addr_add_range
438should check for inverted range bounds and overlaps 441should check for inverted range bounds and overlaps
439on insertion and fail instead of creating a nonsensical 442on insertion and fail instead of creating a nonsensical
440.Fa asid 443.Fa addr
441that fails to be canonized by 444that fails to be canonized by
442.Fn X509v3_asid_canonize . 445.Fn X509v3_addr_canonize .
443.Pp 446.Pp
444If 447If
445.Dv NULL 448.Dv NULL
@@ -457,4 +460,13 @@ crashes with a
457.Dv NULL 460.Dv NULL
458dereference. 461dereference.
459.Pp 462.Pp
460The only supported AFIs are IPv4 and IPv6, but this is not enforced. 463The code only supports the IPv4 and IPv6 AFIs.
464This is not consistently enforced across implementations.
465.Pp
466.Fn X509v3_addr_add_range
467fails to clear the unused bits set to 1 in the last octet of
468the
469.Vt ASN1_BIT_STRING
470representation of
471.Fa max .
472This confuses some software.