diff options
author | tb <> | 2022-01-05 07:47:15 +0000 |
---|---|---|
committer | tb <> | 2022-01-05 07:47:15 +0000 |
commit | 6a84e3bf371065aba96d0c301e5f83493d7eae97 (patch) | |
tree | 584bfee87260953fa4a57fcfebc354746211259d /src/regress | |
parent | 1e2931f5b7e846111974b4afe7f6d0d5b2a761f3 (diff) | |
download | openbsd-6a84e3bf371065aba96d0c301e5f83493d7eae97.tar.gz openbsd-6a84e3bf371065aba96d0c301e5f83493d7eae97.tar.bz2 openbsd-6a84e3bf371065aba96d0c301e5f83493d7eae97.zip |
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 'src/regress')
0 files changed, 0 insertions, 0 deletions