summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/IPAddressRange_new.3
diff options
context:
space:
mode:
authortb <>2023-09-27 08:46:46 +0000
committertb <>2023-09-27 08:46:46 +0000
commit4a56043335e995683614ebfbfb8a3c149dd1985a (patch)
tree719cb838b20bef98a7212beea365f196a2e9ef12 /src/lib/libcrypto/man/IPAddressRange_new.3
parent1faf00b671ebcabe2882493f98cf5b46714b6337 (diff)
downloadopenbsd-4a56043335e995683614ebfbfb8a3c149dd1985a.tar.gz
openbsd-4a56043335e995683614ebfbfb8a3c149dd1985a.tar.bz2
openbsd-4a56043335e995683614ebfbfb8a3c149dd1985a.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/IPAddressRange_new.3')
-rw-r--r--src/lib/libcrypto/man/IPAddressRange_new.335
1 files changed, 18 insertions, 17 deletions
diff --git a/src/lib/libcrypto/man/IPAddressRange_new.3 b/src/lib/libcrypto/man/IPAddressRange_new.3
index bee18bc0b4..07c57f3e5d 100644
--- a/src/lib/libcrypto/man/IPAddressRange_new.3
+++ b/src/lib/libcrypto/man/IPAddressRange_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: IPAddressRange_new.3,v 1.3 2023/09/26 20:42:45 tb Exp $ 1.\" $OpenBSD: IPAddressRange_new.3,v 1.4 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 IPADDRESSRANGE_NEW 3 18.Dt IPADDRESSRANGE_NEW 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -34,7 +34,7 @@
34.Nm IPAddressFamily_free , 34.Nm IPAddressFamily_free ,
35.Nm d2i_IPAddressFamily , 35.Nm d2i_IPAddressFamily ,
36.Nm i2d_IPAddressFamily 36.Nm i2d_IPAddressFamily
37.Nd IP address prefixes and ranges 37.Nd RFC 3779 IP address prefixes and ranges
38.Sh SYNOPSIS 38.Sh SYNOPSIS
39.In openssl/x509v3.h 39.In openssl/x509v3.h
40.Ft "IPAddressRange *" 40.Ft "IPAddressRange *"
@@ -106,25 +106,21 @@ and
106are building blocks of the RFC 3779 106are building blocks of the RFC 3779
107.Vt IPAddrBlocks 107.Vt IPAddrBlocks
108type representing the IP address delegation extension. 108type representing the IP address delegation extension.
109See
110.Xr X509v3_addr_add_inherit 3
111for more details.
112.Pp 109.Pp
113Per RFC 3779, section 2.1.1, 110Per RFC 3779, section 2.1.1,
114an IPv4 or an IPv6 address is encoded in network byte order in an 111an IPv4 or an IPv6 address is encoded in network byte order in an
115ASN.1 BIT STRING of bit size 32 or 128 bits, respectively. 112ASN.1 BIT STRING of bit size 32 or 128 bits, respectively.
116The bit size of a prefix is its prefix length, 113The bit size of a prefix is its prefix length.
117in other words, all insignificant zero bits are omitted. 114In other words, all insignificant zero bits are omitted
115from the encoding.
118An address range is expressed as a pair of BIT STRINGs 116An address range is expressed as a pair of BIT STRINGs
119where all least significant zero bits of the lower bound 117where all least significant zero bits of the lower bound
120and the all least significant one bits of the upper bound are omitted. 118and the all least significant one bits of the upper bound are omitted.
121Whether a prefix or a range represents a range of IPv4 address or
122an IPv6 address must be derived from the context.
123.Pp 119.Pp
124The library provides no API for directly converting an IP address or 120The library provides no API for directly converting an IP address or
125prefix (in any form) to and from an 121prefix (in any form) to and from an
126.Vt ASN1_BIT_STRING 122.Vt ASN1_BIT_STRING .
127and it also provides no API for directly handling ranges. 123It also provides no API for directly handling ranges.
128The 124The
129.Vt ASN1_BIT_STRING 125.Vt ASN1_BIT_STRING
130internals are subtle and directly manipulating them in the 126internals are subtle and directly manipulating them in the
@@ -175,7 +171,7 @@ is
175.Dv NULL , 171.Dv NULL ,
176no action occurs. 172no action occurs.
177.Pp 173.Pp
178There is no dedicated type to represent the 174There is no dedicated type representing the
179.Vt IPAddress 175.Vt IPAddress
180type defined in RFC 3779 section 2.2.3.8. 176type defined in RFC 3779 section 2.2.3.8.
181The API uses 177The API uses
@@ -404,11 +400,11 @@ structure, see
404.Fn IPAddressRange_new 400.Fn IPAddressRange_new
405returns a new 401returns a new
406.Vt IPAddressRange 402.Vt IPAddressRange
407object or 403object with allocated, empty members, or
408.Dv NULL 404.Dv NULL
409if an error occurs. 405if an error occurs.
410.Pp 406.Pp
411.Fn IPAddressRange_new 407.Fn IPAddressOrRange_new
412returns a new, empty 408returns a new, empty
413.Vt IPAddressOrRange 409.Vt IPAddressOrRange
414object or 410object or
@@ -423,8 +419,8 @@ object or
423if an error occurs. 419if an error occurs.
424.Pp 420.Pp
425.Fn IPAddressFamily_new 421.Fn IPAddressFamily_new
426returns a new, 422returns a new
427.Vt IPAddressChoice 423.Vt IPAddressFamily
428object with allocated, empty members, or 424object with allocated, empty members, or
429.Dv NULL 425.Dv NULL
430if an error occurs. 426if an error occurs.
@@ -513,3 +509,8 @@ However, constructing objects is very error prone, be it
513by hand or using the bug-ridden 509by hand or using the bug-ridden
514.Xr X509v3_addr_add_inherit 3 510.Xr X509v3_addr_add_inherit 3
515API. 511API.
512.Pp
513RFC 3779 has element
514.Dq addressesOrRanges .
515Its type in this API is
516.Vt IPAddressOrRanges .