summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_err.c
diff options
context:
space:
mode:
authortb <>2021-12-28 16:26:53 +0000
committertb <>2021-12-28 16:26:53 +0000
commitfecb2b61bad9a2a4a7fd6be04615303d6f017198 (patch)
tree3fef000e0741e91a46b34ddae411b0e0603ba9fd /src/lib/libcrypto/dsa/dsa_err.c
parentefee55c30fd59f557c0a3fd96c431667a2dc0002 (diff)
downloadopenbsd-fecb2b61bad9a2a4a7fd6be04615303d6f017198.tar.gz
openbsd-fecb2b61bad9a2a4a7fd6be04615303d6f017198.tar.bz2
openbsd-fecb2b61bad9a2a4a7fd6be04615303d6f017198.zip
Simplify and explain expand_addr() a bit
RFC 3779 section 2.1.2 does a decent job of explaining how IP addresses are encoded in. What's stored amounts to a prefix with all trailing zero octets omitted. If there are trailing zero bits in the last non-zero octet, bs->flags & 7 indicates how many. addr_expand() expands this to an address of length 4 or 16 depending on whether we deal with IPv4 or IPv6. Since an address can be the lower or the upper bound of a prefix or address range, expansion needs to be able to zero-fill or one-fill the unused bits/octets. No other expansion is ever used, so simplify the meaning of fill accordingly. There's no need to special case the case that there are no unused bits, the masking/filling is a noop. ok jsing
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_err.c')
0 files changed, 0 insertions, 0 deletions