]> git.ipfire.org Git - thirdparty/openssl.git/commit
Don't crash encoding a public key with no public key value
authorMatt Caswell <matt@openssl.org>
Mon, 25 Oct 2021 12:07:01 +0000 (13:07 +0100)
committerPauli <pauli@openssl.org>
Tue, 26 Oct 2021 22:57:12 +0000 (08:57 +1000)
commit6187d9eac2738e873d23c0c91f9769333b1bb6af
tree0ece0cda3fe78e575139897a98322db263b78def
parent9dddcd90a1350fa63486cbf3226c3eee79f9aff5
Don't crash encoding a public key with no public key value

If asked to encode an EC_KEY public key, but no public key value is present
in the structure, we should fail rather than crash.

Fixes the crash seen here:
https://mta.openssl.org/pipermail/openssl-users/2021-October/014479.html

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16911)
providers/implementations/encode_decode/encode_key2any.c