]> git.ipfire.org Git - thirdparty/openssl.git/commit
Replace size check with more meaningful pubkey check
authorTomas Mraz <tomas@openssl.org>
Wed, 2 Feb 2022 16:47:26 +0000 (17:47 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 7 Feb 2022 15:32:40 +0000 (16:32 +0100)
commit2c0f7d46b8449423446cfe1e52fc1e1ecd506b62
tree9a95acbd450252f6d2f7ce3398c1a75b47911bbe
parentf6f4d1cc00a557232955867b6c04f767e8b5a12e
Replace size check with more meaningful pubkey check

It does not make sense to check the size because this
function can be used in other contexts than in TLS-1.3 and
the value might not be padded to the size of p.

However it makes sense to do the partial pubkey check because
there is no valid reason having the pubkey value outside the
1 < pubkey < p-1 bounds.

Fixes #15465

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17630)
crypto/dh/dh_key.c