diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-05 07:47:16 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-05 07:47:16 +0000 |
commit | 4ea1446807452fcc50e5a225f9209ca6e14f0519 (patch) | |
tree | d1fa52f5e25c113f86a93edd053b1e3302617d09 /regress | |
parent | 2785282f38ce0fac6579fbaa0401d728c856dd0d (diff) |
Remove a bogus memcmp in range_should_be_prefix()
range_should_be_prefix() currently always fails. The reason for this
is that OpenSSL commit 42d7d7dd incorrectly moved a memcmp() out of
an assertion. As a consequence, the library emits and accepts
incorrectly encoded ipAddrBlock extensions since it will never detect
ranges that MUST be encoded as a prefix according to RFC 3779, 2.2.3.7.
The return -1 from this memcmp() indicates to the callers that the
range should be expressed as a range, so callers must check beforehand
that min <= max to be able to fail. Thus, remove this memcmp() and
add a check to make_addressRange(), the only caller that didn't already
ensure that min <= max.
This fixes the noisy output in regress/lib/libcrypto/x509/rfc3779.
ok inoguchi jsing
Diffstat (limited to 'regress')
0 files changed, 0 insertions, 0 deletions